MobileNet family of models
This is the API reference for the MobileNet family of models supported by Metalhead.jl.
Metalhead.MobileNetv1
— TypeMobileNetv1(width_mult::Real = 1; pretrain::Bool = false,
inchannels::Integer = 3, nclasses::Integer = 1000)
Create a MobileNetv1 model with the baseline configuration (reference).
Arguments
width_mult
: Controls the number of output feature maps in each block (with 1 being the default in the paper; this is usually a value between 0.1 and 1.4)pretrain
: Whether to load the pre-trained weights for ImageNetinchannels
: The number of input channels.nclasses
: The number of output classes
MobileNetv1
does not currently support pretrained weights.
See also Metalhead.mobilenetv1
.
Metalhead.MobileNetv2
— TypeMobileNetv2(width_mult = 1.0; inchannels::Integer = 3, pretrain::Bool = false,
nclasses::Integer = 1000)
Create a MobileNetv2 model with the specified configuration. (reference).
Arguments
width_mult
: Controls the number of output feature maps in each block (with 1 being the default in the paper; this is usually a value between 0.1 and 1.4)pretrain
: Whether to load the pre-trained weights for ImageNetinchannels
: The number of input channels.nclasses
: The number of output classes
MobileNetv2
does not currently support pretrained weights.
See also Metalhead.mobilenetv2
.
Metalhead.MobileNetv3
— TypeMobileNetv3(config::Symbol; width_mult::Real = 1, pretrain::Bool = false,
inchannels::Integer = 3, nclasses::Integer = 1000)
Create a MobileNetv3 model with the specified configuration. (reference). Set pretrain = true
to load the model with pre-trained weights for ImageNet.
Arguments
config
: :small or :large for the size of the model (see paper).width_mult
: Controls the number of output feature maps in each block (with 1 being the default in the paper; this is usually a value between 0.1 and 1.4)pretrain
: whether to load the pre-trained weights for ImageNetinchannels
: number of input channelsnclasses
: the number of output classes
MobileNetv3
does not currently support pretrained weights.
See also Metalhead.mobilenetv3
.
Metalhead.MNASNet
— TypeMNASNet(config::Symbol; width_mult::Real = 1, pretrain::Bool = false,
inchannels::Integer = 3, nclasses::Integer = 1000)
Creates a MNASNet model with the specified configuration. (reference)
Arguments
config
: configuration of the model. One ofB1
,A1
orsmall
.B1
is without squeeze-and-excite layers,A1
is with squeeze-and-excite layers, andsmall
is a smaller version ofA1
.width_mult
: Controls the number of output feature maps in each block (with 1 being the default in the paper; this is usually a value between 0.1 and 1.4)pretrain
: Whether to load the pre-trained weights for ImageNetinchannels
: The number of input channels.nclasses
: The number of output classes
MNASNet
does not currently support pretrained weights.
See also Metalhead.mnasnet
.