weather_projector¶
This model takes weather/2d inputs (batch, features, height, width) and produces tokens for multimodal language models.
- class mfai.pytorch.models.weather_projector.PatchMaker(patch_size, input_dims, autopadding=True)[source]¶
Bases:
ModuleConverts a vision/weather (B, C, H, W) tensor into a (B, T, F) token tensor. T stands for token dimension and F the feature/embedding dimension. Each token is built with all the data of one patch of size patch_size.
- class mfai.pytorch.models.weather_projector.WeatherProjector(settings=WeatherProjectorSettings(patch_size=None, input_dims=(3, 256, 256), embedding_dim=768))[source]¶
Bases:
Module- Parameters:
settings (WeatherProjectorSettings)
- class mfai.pytorch.models.weather_projector.WeatherProjectorSettings(patch_size=None, input_dims=(3, 256, 256), embedding_dim=768)[source]¶
Bases:
object- Parameters:
- classmethod from_dict(kvs, *, infer_missing=False)¶
- classmethod from_json(s, *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw)¶
- classmethod schema(*, infer_missing=False, only=None, exclude=(), many=False, context=None, load_only=(), dump_only=(), partial=False, unknown=None)¶
- to_json(*, skipkeys=False, ensure_ascii=True, check_circular=True, allow_nan=True, indent=None, separators=None, default=None, sort_keys=False, **kw)¶