DenseNet
This is the API reference for the DenseNet model present in Metalhead.jl.
The higher level model
Metalhead.DenseNet
— TypeDenseNet(config::Int; pretrain = false, growth_rate = 32,
reduction = 0.5, inchannels = 3, nclasses = 1000)
Create a DenseNet model with specified configuration. Currently supported values are (121, 161, 169, 201) (reference).
Arguments
config
: the configuration of the modelpretrain
: whether to load the model with pre-trained weights for ImageNet.growth_rate
: the output feature map growth probability of dense blocks (i.e.k
in the ref)reduction
: the factor by which the number of feature maps is scaled across each transitioninchannels
: the number of input channelsnclasses
: the number of output classes
DenseNet
does not currently support pretrained weights.
See also Metalhead.densenet
.
The core function
Metalhead.densenet
— Functiondensenet(nblocks::AbstractVector{Int}; growth_rate = 32,
reduction = 0.5, dropout_prob = nothing, inchannels = 3,
nclasses = 1000)
Create a DenseNet model (reference).
Arguments
nblocks
: number of dense blocks between transitionsgrowth_rate
: the output feature map growth probability of dense blocks (i.e.k
in the ref)reduction
: the factor by which the number of feature maps is scaled across each transitiondropout_prob
: the dropout probability for the classifier head. Set tonothing
to disable dropoutinchannels
: the number of input channelsnclasses
: the number of output classes