+ reduction = 0.5, inchannels = 3, nclasses = 1000)</code></pre><p>Create a DenseNet model with specified configuration. Currently supported values are (121, 161, 169, 201) (<a href="https://arxiv.org/abs/1608.06993">reference</a>).</p><p><strong>Arguments</strong></p><ul><li><code>config</code>: the configuration of the model</li><li><code>pretrain</code>: whether to load the model with pre-trained weights for ImageNet.</li><li><code>growth_rate</code>: the output feature map growth probability of dense blocks (i.e. <code>k</code> in the ref)</li><li><code>reduction</code>: the factor by which the number of feature maps is scaled across each transition</li><li><code>inchannels</code>: the number of input channels</li><li><code>nclasses</code>: the number of output classes</li></ul><div class="admonition is-warning"><header class="admonition-header">Warning</header><div class="admonition-body"><p><code>DenseNet</code> does not currently support pretrained weights.</p></div></div><p>See also <a href="#Metalhead.densenet"><code>Metalhead.densenet</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/FluxML/Metalhead.jl/blob/edf16b49f119fb0fbf2fe5a36f00daf031071080/src/convnets/densenet.jl#L119-L139">source</a></section></article><h2 id="The-core-function"><a class="docs-heading-anchor" href="#The-core-function">The core function</a><a id="The-core-function-1"></a><a class="docs-heading-anchor-permalink" href="#The-core-function" title="Permalink"></a></h2><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="Metalhead.densenet" href="#Metalhead.densenet"><code>Metalhead.densenet</code></a> — <span class="docstring-category">Function</span><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><pre><code class="language-julia hljs">densenet(nblocks::AbstractVector{Int}; growth_rate = 32,
0 commit comments