Other models
This is the API reference for some of the other models supported by Metalhead.jl that do not fit into the other categories.
The higher-level model constructors
Metalhead.AlexNet
— TypeAlexNet(; pretrain::Bool = false, inchannels::Integer = 3,
nclasses::Integer = 1000)
Create a AlexNet
. (reference).
Arguments
pretrain
: set totrue
to load pre-trained weights for ImageNetinchannels
: The number of input channels.nclasses
: the number of output classes
AlexNet
does not currently support pretrained weights.
See also alexnet
.
Metalhead.VGG
— TypeVGG(imsize::Dims{2}; config, inchannels, batchnorm = false, nclasses, fcsize, dropout_prob)
Construct a VGG model with the specified input image size. Typically, the image size is (224, 224)
.
Keyword Arguments:
config
: VGG convolutional block configuration. It is defined as a vector of tuples(output_channels, num_convolutions)
for each blockinchannels
: number of input channelsbatchnorm
: set totrue
to use batch normalization after each convolutionnclasses
: number of output classesfcsize
: intermediate fully connected layer size (seeMetalhead.vgg_classifier_layers
)dropout_prob
: dropout level between fully connected layers
Metalhead.SqueezeNet
— TypeSqueezeNet(; pretrain::Bool = false, inchannels::Integer = 3,
nclasses::Integer = 1000)
Create a SqueezeNet (reference).
Arguments
pretrain
: set totrue
to load the pre-trained weights for ImageNetinchannels
: number of input channels.nclasses
: the number of output classes.
See also squeezenet
.
The mid-level functions
Metalhead.alexnet
— Functionalexnet(; dropout_prob = 0.5, inchannels::Integer = 3, nclasses::Integer = 1000)
Create an AlexNet model (reference).
Arguments
dropout_prob
: dropout probability for the classifierinchannels
: The number of input channels.nclasses
: the number of output classes
Metalhead.vgg
— Functionvgg(imsize; config, inchannels, batchnorm = false, nclasses, fcsize, dropout_prob)
Create a VGG model (reference).
Arguments
imsize
: input image width and height as a tupleconfig
: the configuration for the convolution layers (seeMetalhead.vgg_convolutional_layers
)inchannels
: number of input channelsbatchnorm
: set totrue
to use batch normalization after each convolutionnclasses
: number of output classesfcsize
: intermediate fully connected layer size (seeMetalhead.vgg_classifier_layers
)dropout_prob
: dropout level between fully connected layers
Metalhead.squeezenet
— Functionsqueezenet(; dropout_prob = 0.5, inchannels::Integer = 3, nclasses::Integer = 1000)
Create a SqueezeNet model. (reference).
Arguments
dropout_prob
: dropout probability for the classifier head. Set tonothing
to disable dropout.inchannels
: number of input channels.nclasses
: the number of output classes.