EffNetImageEmbedder

class lightautoml.image.image.EffNetImageEmbedder(model_name='efficientnet-b0', weights_path=None, is_advprop=True, device=torch.device)[source]

Bases: torch.nn.Module

Class to compute EfficientNet embeddings.

__init__(model_name='efficientnet-b0', weights_path=None, is_advprop=True, device=torch.device)[source]

Pytorch module for image embeddings based on efficient-net model.

Parameters
  • model_name (str) – Name of effnet model.

  • weights_path (Optional[str]) – Path to saved weights.

  • is_advprop (bool) – Use adversarial training.

  • devices – Device to use.

get_shape()

Calculate output embedding shape.

Return type

int

Returns

Shape of embedding.