flair.embeddings.image#
- class flair.embeddings.image.ImageEmbeddingsView on GitHub#
Bases:
Embeddings
[Image
]- property embedding_type: str#
- to_params()View on GitHub#
- Return type:
Dict
[str
,Any
]
- classmethod from_params(params)View on GitHub#
- Return type:
- class flair.embeddings.image.IdentityImageEmbeddings(transforms)View on GitHub#
Bases:
ImageEmbeddings
- property embedding_length: int#
Returns the length of the embedding vector.
- embeddings_name: str = 'IdentityImageEmbeddings'#
- class flair.embeddings.image.PrecomputedImageEmbeddings(url2tensor_dict, name)View on GitHub#
Bases:
ImageEmbeddings
- property embedding_length: int#
Returns the length of the embedding vector.
- embeddings_name: str = 'PrecomputedImageEmbeddings'#
- class flair.embeddings.image.NetworkImageEmbeddings(name, pretrained=True, transforms=None)View on GitHub#
Bases:
ImageEmbeddings
- property embedding_length: int#
Returns the length of the embedding vector.
- embeddings_name: str = 'NetworkImageEmbeddings'#
- class flair.embeddings.image.ConvTransformNetworkImageEmbeddings(feats_in, convnet_parms, posnet_parms, transformer_parms)View on GitHub#
Bases:
ImageEmbeddings
- forward(x)View on GitHub#
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Module
instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- property embedding_length#
Returns the length of the embedding vector.
- embeddings_name: str = 'ConvTransformNetworkImageEmbeddings'#