Skip to content

Efficientnet-V1#

eqxvision.models.EfficientNet #

A simple port of torchvision.models.efficientnet.

__init__(self, inverted_residual_setting: Sequence[Union[_MBConvConfig, _FusedMBConvConfig]], dropout: float, stochastic_depth_prob: float = 0.2, num_classes: int = 1000, norm_layer: Optional[eqx.Module] = None, last_channel: Optional[int] = None, *, key: jax.random.PRNGKey = None) #

Arguments:

  • inverted_residual_setting: Network structure
  • dropout: The dropout probability
  • stochastic_depth_prob: Probability of dropping a sample along channels
  • num_classes: Number of classes in the classification task. Also controls the final output shape (num_classes,)
  • norm_layer: Normalisation applied to the intermediate outputs
  • last_channel: The number of channels on the penultimate layer
  • key: A jax.random.PRNGKey used to provide randomness for parameter initialisation. (Keyword only argument.)
__call__(self, x: Array, *, key: jax.random.PRNGKey) -> Array #

Arguments:

  • x: The input JAX array.
  • key: Required parameter. Utilised by few layers such as Dropout or DropPath.

eqxvision.models.efficientnet_b0(torch_weights: str = None, **kwargs: Any) -> EfficientNet #

EfficientNet B0 model architecture from the EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks paper.

Arguments:

  • torch_weights: A Path or URL for the PyTorch weights. Defaults to None

eqxvision.models.efficientnet_b1(torch_weights: str = None, **kwargs: Any) -> EfficientNet #

EfficientNet B1 model architecture from the EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks paper.

Arguments:

  • torch_weights: A Path or URL for the PyTorch weights. Defaults to None

eqxvision.models.efficientnet_b2(torch_weights: str = None, **kwargs: Any) -> EfficientNet #

EfficientNet B2 model architecture from the EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks paper.

Arguments:

  • torch_weights: A Path or URL for the PyTorch weights. Defaults to None

eqxvision.models.efficientnet_b3(torch_weights: str = None, **kwargs: Any) -> EfficientNet #

EfficientNet B3 model architecture from the EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks paper.

Arguments:

  • torch_weights: A Path or URL for the PyTorch weights. Defaults to None

eqxvision.models.efficientnet_b4(torch_weights: str = None, **kwargs: Any) -> EfficientNet #

EfficientNet B4 model architecture from the EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks paper.

Arguments:

  • torch_weights: A Path or URL for the PyTorch weights. Defaults to None

eqxvision.models.efficientnet_b5(torch_weights: str = None, **kwargs: Any) -> EfficientNet #

EfficientNet B5 model architecture from the EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks paper.

Arguments:

  • torch_weights: A Path or URL for the PyTorch weights. Defaults to None

eqxvision.models.efficientnet_b6(torch_weights: str = None, **kwargs: Any) -> EfficientNet #

EfficientNet B6 model architecture from the EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks paper.

Arguments:

  • torch_weights: A Path or URL for the PyTorch weights. Defaults to None

eqxvision.models.efficientnet_b7(torch_weights: str = None, **kwargs: Any) -> EfficientNet #

EfficientNet B7 model architecture from the EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks paper.

Arguments:

  • torch_weights: A Path or URL for the PyTorch weights. Defaults to None