EfficientNet family of models

This is the API reference for the EfficientNet family of models supported by Metalhead.jl.

The higher-level model constructors

Metalhead.EfficientNetType
EfficientNet(config::Symbol; pretrain::Bool = false, inchannels::Integer = 3,
             nclasses::Integer = 1000)

Create an EfficientNet model (reference).

Arguments

  • config: size of the model. Can be one of [:b0, :b1, :b2, :b3, :b4, :b5, :b6, :b7, :b8].
  • pretrain: set to true to load the pre-trained weights for ImageNet
  • inchannels: number of input channels.
  • nclasses: number of output classes.
Warning

EfficientNet does not currently support pretrained weights.

See also Metalhead.efficientnet.

source
Metalhead.EfficientNetv2Type
EfficientNetv2(config::Symbol; pretrain::Bool = false, inchannels::Integer = 3,
               nclasses::Integer = 1000)

Create an EfficientNetv2 model (reference).

Arguments

  • config: size of the network (one of [:small, :medium, :large, :xlarge])
  • pretrain: whether to load the pre-trained weights for ImageNet
  • inchannels: number of input channels
  • nclasses: number of output classes
Warning

EfficientNetv2 does not currently support pretrained weights.

See also efficientnet.

source

The mid-level functions

Metalhead.efficientnetFunction
efficientnet(config::Symbol; norm_layer = BatchNorm, stochastic_depth_prob = 0.2,
             dropout_prob = nothing, inchannels::Integer = 3, nclasses::Integer = 1000)

Create an EfficientNet model. (reference).

Arguments

  • config: size of the model. Can be one of [:b0, :b1, :b2, :b3, :b4, :b5, :b6, :b7, :b8].
  • norm_layer: normalization layer to use.
  • stochastic_depth_prob: probability of stochastic depth. Set to nothing to disable stochastic depth.
  • dropout_prob: probability of dropout in the classifier head. Set to nothing to disable dropout.
  • inchannels: number of input channels.
  • nclasses: number of output classes.
source
Metalhead.efficientnetv2Function
efficientnetv2(config::Symbol; norm_layer = BatchNorm, stochastic_depth_prob = 0.2,
               dropout_prob = nothing, inchannels::Integer = 3, nclasses::Integer = 1000)

Create an EfficientNetv2 model. (reference).

Arguments

  • config: size of the network (one of [:small, :medium, :large, :xlarge])
  • norm_layer: normalization layer to use.
  • stochastic_depth_prob: probability of stochastic depth. Set to nothing to disable stochastic depth.
  • dropout_prob: probability of dropout in the classifier head. Set to nothing to disable dropout.
  • inchannels: number of input channels.
  • nclasses: number of output classes.
source