blob: 81b3cd313bc02570157768689c40836b14c9ea0b [file] [log] [blame]
<!doctype html>
<html lang="en" class="no-js">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="lang:clipboard.copy" content="Copy to clipboard">
<meta name="lang:clipboard.copied" content="Copied to clipboard">
<meta name="lang:search.language" content="en">
<meta name="lang:search.pipeline.stopwords" content="True">
<meta name="lang:search.pipeline.trimmer" content="True">
<meta name="lang:search.result.none" content="No matching documents">
<meta name="lang:search.result.one" content="1 matching document">
<meta name="lang:search.result.other" content="# matching documents">
<meta name="lang:search.tokenizer" content="[\s\-]+">
<link rel="shortcut icon" href="../../assets/images/favicon.png">
<meta name="generator" content="mkdocs-1.0.4, mkdocs-material-4.6.0">
<title>Models - MXNet.jl</title>
<link rel="stylesheet" href="../../assets/stylesheets/application.1b62728e.css">
<script src="../../assets/javascripts/modernizr.268332fc.js"></script>
<link href="https://fonts.gstatic.com" rel="preconnect" crossorigin>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,400i,700%7CRoboto+Mono&display=fallback">
<style>body,input{font-family:"Roboto","Helvetica Neue",Helvetica,Arial,sans-serif}code,kbd,pre{font-family:"Roboto Mono","Courier New",Courier,monospace}</style>
<link rel="stylesheet" href="../../assets/fonts/material-icons.css">
<link rel="stylesheet" href="../../assets/Documenter.css">
</head>
<body dir="ltr">
<svg class="md-svg">
<defs>
<svg xmlns="http://www.w3.org/2000/svg" width="416" height="448" viewBox="0 0 416 448" id="__github"><path fill="currentColor" d="M160 304q0 10-3.125 20.5t-10.75 19T128 352t-18.125-8.5-10.75-19T96 304t3.125-20.5 10.75-19T128 256t18.125 8.5 10.75 19T160 304zm160 0q0 10-3.125 20.5t-10.75 19T288 352t-18.125-8.5-10.75-19T256 304t3.125-20.5 10.75-19T288 256t18.125 8.5 10.75 19T320 304zm40 0q0-30-17.25-51T296 232q-10.25 0-48.75 5.25Q229.5 240 208 240t-39.25-2.75Q130.75 232 120 232q-29.5 0-46.75 21T56 304q0 22 8 38.375t20.25 25.75 30.5 15 35 7.375 37.25 1.75h42q20.5 0 37.25-1.75t35-7.375 30.5-15 20.25-25.75T360 304zm56-44q0 51.75-15.25 82.75-9.5 19.25-26.375 33.25t-35.25 21.5-42.5 11.875-42.875 5.5T212 416q-19.5 0-35.5-.75t-36.875-3.125-38.125-7.5-34.25-12.875T37 371.5t-21.5-28.75Q0 312 0 260q0-59.25 34-99-6.75-20.5-6.75-42.5 0-29 12.75-54.5 27 0 47.5 9.875t47.25 30.875Q171.5 96 212 96q37 0 70 8 26.25-20.5 46.75-30.25T376 64q12.75 25.5 12.75 54.5 0 21.75-6.75 42 34 40 34 99.5z"/></svg>
</defs>
</svg>
<input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
<input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off">
<label class="md-overlay" data-md-component="overlay" for="__drawer"></label>
<a href="#model" tabindex="1" class="md-skip">
Skip to content
</a>
<header class="md-header" data-md-component="header">
<nav class="md-header-nav md-grid">
<div class="md-flex">
<div class="md-flex__cell md-flex__cell--shrink">
<a href="../.." title="MXNet.jl" class="md-header-nav__button md-logo">
<i class="md-icon"></i>
</a>
</div>
<div class="md-flex__cell md-flex__cell--shrink">
<label class="md-icon md-icon--menu md-header-nav__button" for="__drawer"></label>
</div>
<div class="md-flex__cell md-flex__cell--stretch">
<div class="md-flex__ellipsis md-header-nav__title" data-md-component="title">
<span class="md-header-nav__topic">
MXNet.jl
</span>
<span class="md-header-nav__topic">
Models
</span>
</div>
</div>
<div class="md-flex__cell md-flex__cell--shrink">
<label class="md-icon md-icon--search md-header-nav__button" for="__search"></label>
<div class="md-search" data-md-component="search" role="dialog">
<label class="md-search__overlay" for="__search"></label>
<div class="md-search__inner" role="search">
<form class="md-search__form" name="search">
<input type="text" class="md-search__input" name="query" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="query" data-md-state="active">
<label class="md-icon md-search__icon" for="__search"></label>
<button type="reset" class="md-icon md-search__icon" data-md-component="reset" tabindex="-1">
&#xE5CD;
</button>
</form>
<div class="md-search__output">
<div class="md-search__scrollwrap" data-md-scrollfix>
<div class="md-search-result" data-md-component="result">
<div class="md-search-result__meta">
Type to start searching
</div>
<ol class="md-search-result__list"></ol>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="md-flex__cell md-flex__cell--shrink">
<div class="md-header-nav__source">
<a href="https://github.com/apache/mxnet/tree/master/julia#mxnet/" title="Go to repository" class="md-source" data-md-source="github">
<div class="md-source__icon">
<svg viewBox="0 0 24 24" width="24" height="24">
<use xlink:href="#__github" width="24" height="24"></use>
</svg>
</div>
<div class="md-source__repository">
GitHub
</div>
</a>
</div>
</div>
</div>
</nav>
</header>
<div class="md-container">
<main class="md-main" role="main">
<div class="md-main__inner md-grid" data-md-component="container">
<div class="md-sidebar md-sidebar--primary" data-md-component="navigation">
<div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner">
<nav class="md-nav md-nav--primary" data-md-level="0">
<label class="md-nav__title md-nav__title--site" for="__drawer">
<a href="../.." title="MXNet.jl" class="md-nav__button md-logo">
<i class="md-icon"></i>
</a>
MXNet.jl
</label>
<div class="md-nav__source">
<a href="https://github.com/apache/mxnet/tree/master/julia#mxnet/" title="Go to repository" class="md-source" data-md-source="github">
<div class="md-source__icon">
<svg viewBox="0 0 24 24" width="24" height="24">
<use xlink:href="#__github" width="24" height="24"></use>
</svg>
</div>
<div class="md-source__repository">
GitHub
</div>
</a>
</div>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../.." title="Home" class="md-nav__link">
Home
</a>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-toggle md-nav__toggle" data-md-toggle="nav-2" type="checkbox" id="nav-2">
<label class="md-nav__link" for="nav-2">
Tutorial
</label>
<nav class="md-nav" data-md-component="collapsible" data-md-level="1">
<label class="md-nav__title" for="nav-2">
Tutorial
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../../tutorial/mnist/" title="Digit Recognition on MNIST" class="md-nav__link">
Digit Recognition on MNIST
</a>
</li>
<li class="md-nav__item">
<a href="../../tutorial/char-lstm/" title="Generating Random Sentence with LSTM RNN" class="md-nav__link">
Generating Random Sentence with LSTM RNN
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-toggle md-nav__toggle" data-md-toggle="nav-3" type="checkbox" id="nav-3">
<label class="md-nav__link" for="nav-3">
User Guide
</label>
<nav class="md-nav" data-md-component="collapsible" data-md-level="1">
<label class="md-nav__title" for="nav-3">
User Guide
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../../user-guide/install/" title="Installation Guide" class="md-nav__link">
Installation Guide
</a>
</li>
<li class="md-nav__item">
<a href="../../user-guide/overview/" title="Overview" class="md-nav__link">
Overview
</a>
</li>
<li class="md-nav__item">
<a href="../../user-guide/faq/" title="FAQ" class="md-nav__link">
FAQ
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--active md-nav__item--nested">
<input class="md-toggle md-nav__toggle" data-md-toggle="nav-4" type="checkbox" id="nav-4" checked>
<label class="md-nav__link" for="nav-4">
API Documentation
</label>
<nav class="md-nav" data-md-component="collapsible" data-md-level="1">
<label class="md-nav__title" for="nav-4">
API Documentation
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../context/" title="Context" class="md-nav__link">
Context
</a>
</li>
<li class="md-nav__item md-nav__item--active">
<input class="md-toggle md-nav__toggle" data-md-toggle="toc" type="checkbox" id="__toc">
<a href="./" title="Models" class="md-nav__link md-nav__link--active">
Models
</a>
</li>
<li class="md-nav__item">
<a href="../initializer/" title="Initializers" class="md-nav__link">
Initializers
</a>
</li>
<li class="md-nav__item">
<a href="../optimizer/" title="Optimizers" class="md-nav__link">
Optimizers
</a>
</li>
<li class="md-nav__item">
<a href="../callback/" title="Callbacks in training" class="md-nav__link">
Callbacks in training
</a>
</li>
<li class="md-nav__item">
<a href="../metric/" title="Evaluation Metrics" class="md-nav__link">
Evaluation Metrics
</a>
</li>
<li class="md-nav__item">
<a href="../io/" title="Data Providers" class="md-nav__link">
Data Providers
</a>
</li>
<li class="md-nav__item">
<a href="../ndarray/" title="NDArray API" class="md-nav__link">
NDArray API
</a>
</li>
<li class="md-nav__item">
<a href="../symbolic-node/" title="Symbolic API" class="md-nav__link">
Symbolic API
</a>
</li>
<li class="md-nav__item">
<a href="../nn-factory/" title="Neural Networks Factory" class="md-nav__link">
Neural Networks Factory
</a>
</li>
<li class="md-nav__item">
<a href="../executor/" title="Executor" class="md-nav__link">
Executor
</a>
</li>
<li class="md-nav__item">
<a href="../kvstore/" title="Key-Value Store" class="md-nav__link">
Key-Value Store
</a>
</li>
<li class="md-nav__item">
<a href="../visualize/" title="Network Visualization" class="md-nav__link">
Network Visualization
</a>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</div>
</div>
</div>
<div class="md-sidebar md-sidebar--secondary" data-md-component="toc">
<div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner">
<nav class="md-nav md-nav--secondary">
</nav>
</div>
</div>
</div>
<div class="md-content">
<article class="md-content__inner md-typeset">
<a href="https://github.com/apache/mxnet/tree/master/edit/master/docs/api/model.md" title="Edit this page" class="md-icon md-content__icon">&#xE3C9;</a>
<!–- Licensed to the Apache Software Foundation (ASF) under one –> <!–- or more contributor license agreements. See the NOTICE file –> <!–- distributed with this work for additional information –> <!–- regarding copyright ownership. The ASF licenses this file –> <!–- to you under the Apache License, Version 2.0 (the –> <!–- "License"); you may not use this file except in compliance –> <!–- with the License. You may obtain a copy of the License at –>
<!–- http://www.apache.org/licenses/LICENSE-2.0 –>
<!–- Unless required by applicable law or agreed to in writing, –> <!–- software distributed under the License is distributed on an –> <!–- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY –> <!–- KIND, either express or implied. See the License for the –> <!–- specific language governing permissions and limitations –> <!–- under the License. –>
<p><a id='Model-1'></a></p>
<h1 id="model">Model</h1>
<p>The model API provides convenient high-level interface to do training and predicting on a network described using the symbolic API.</p>
<p><a id='MXNet.mx.AbstractModel' href='#MXNet.mx.AbstractModel'>#</a>
<strong><code>MXNet.mx.AbstractModel</code></strong> &mdash; <em>Type</em>.</p>
<pre><code class="julia">AbstractModel
</code></pre>
<p>The abstract super type of all models in MXNet.jl.</p>
<p><a target='_blank' href='https://github.com/apache/mxnet/blob/26a5ad1f39784a60d1564f6f740e5c7bd971cd65/julia/src/model.jl#L18-L22' class='documenter-source'>source</a><br></p>
<p><a id='MXNet.mx.FeedForward' href='#MXNet.mx.FeedForward'>#</a>
<strong><code>MXNet.mx.FeedForward</code></strong> &mdash; <em>Type</em>.</p>
<pre><code class="julia">FeedForward
</code></pre>
<p>The feedforward model provides convenient interface to train and predict on feedforward architectures like multi-layer MLP, ConvNets, etc. There is no explicitly handling of <em>time index</em>, but it is relatively easy to implement unrolled RNN / LSTM under this framework (<em>TODO</em>: add example). For models that handles sequential data explicitly, please use <em>TODO</em>...</p>
<p><a target='_blank' href='https://github.com/apache/mxnet/blob/26a5ad1f39784a60d1564f6f740e5c7bd971cd65/julia/src/model.jl#L25-L33' class='documenter-source'>source</a><br></p>
<p><a id='MXNet.mx.FeedForward-Tuple{SymbolicNode}' href='#MXNet.mx.FeedForward-Tuple{SymbolicNode}'>#</a>
<strong><code>MXNet.mx.FeedForward</code></strong> &mdash; <em>Method</em>.</p>
<pre><code class="julia">FeedForward(arch :: SymbolicNode, ctx)
</code></pre>
<p><strong>Arguments:</strong></p>
<ul>
<li><code>arch</code>: the architecture of the network constructed using the symbolic API.</li>
<li><code>ctx</code>: the devices on which this model should do computation. It could be a single <code>Context</code> or a list of <code>Context</code> objects. In the latter case, data parallelization will be used for training. If no context is provided, the default context <code>cpu()</code> will be used.</li>
</ul>
<p><a target='_blank' href='https://github.com/apache/mxnet/blob/26a5ad1f39784a60d1564f6f740e5c7bd971cd65/julia/src/model.jl#L65-L73' class='documenter-source'>source</a><br></p>
<p><a id='MXNet.mx.predict-Tuple{Function,FeedForward,AbstractDataProvider}' href='#MXNet.mx.predict-Tuple{Function,FeedForward,AbstractDataProvider}'>#</a>
<strong><code>MXNet.mx.predict</code></strong> &mdash; <em>Method</em>.</p>
<pre><code class="julia">predict(self, data; overwrite=false, callback=nothing)
</code></pre>
<p>Predict using an existing model. The model should be already initialized, or trained or loaded from a checkpoint. There is an overloaded function that allows to pass the callback as the first argument, so it is possible to do</p>
<pre><code class="julia">predict(model, data) do batch_output
# consume or write batch_output to file
end
</code></pre>
<p><strong>Arguments:</strong></p>
<ul>
<li><code>self::FeedForward</code>: the model.</li>
<li><code>data::AbstractDataProvider</code>: the data to perform prediction on.</li>
<li><code>overwrite::Bool</code>: an <code>Executor</code> is initialized the first time predict is called. The memory allocation of the <code>Executor</code> depends on the mini-batch size of the test data provider. If you call predict twice with data provider of the same batch-size, then the executor can be potentially be re-used. So, if <code>overwrite</code> is false, we will try to re-use, and raise an error if batch-size changed. If <code>overwrite</code> is true (the default), a new <code>Executor</code> will be created to replace the old one.</li>
<li><code>verbosity::Integer</code>: Determines the verbosity of the print messages. Higher numbers leads to more verbose printing. Acceptable values are - <code>0</code>: Do not print anything during prediction - <code>1</code>: Print allocation information during prediction</li>
</ul>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>Prediction is computationally much less costly than training, so the bottleneck sometimes becomes the IO for copying mini-batches of data. Since there is no concern about convergence in prediction, it is better to set the mini-batch size as large as possible (limited by your device memory) if prediction speed is a concern.</p>
<p>For the same reason, currently prediction will only use the first device even if multiple devices are provided to construct the model.</p>
</div>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>If you perform further after prediction. The weights are not automatically synchronized if <code>overwrite</code> is set to false and the old predictor is re-used. In this case setting <code>overwrite</code> to true (the default) will re-initialize the predictor the next time you call predict and synchronize the weights again.</p>
</div>
<p>See also <a href="./#MXNet.mx.train-Tuple{FeedForward,AbstractOptimizer,AbstractDataProvider}"><code>train</code></a>, <a href="./#MXNet.mx.fit-Tuple{FeedForward,AbstractOptimizer,AbstractDataProvider}"><code>fit</code></a>, <a href="./#MXNet.mx.init_model-Tuple{FeedForward,AbstractInitializer}"><code>init_model</code></a>, and <a href="./#MXNet.mx.load_checkpoint-Tuple{AbstractString,Int64,Type{FeedForward}}"><code>load_checkpoint</code></a></p>
<p><a target='_blank' href='https://github.com/apache/mxnet/blob/26a5ad1f39784a60d1564f6f740e5c7bd971cd65/julia/src/model.jl#L178-L221' class='documenter-source'>source</a><br></p>
<p><a id='MXNet.mx._split_inputs-Tuple{Int64,Int64}' href='#MXNet.mx._split_inputs-Tuple{Int64,Int64}'>#</a>
<strong><code>MXNet.mx._split_inputs</code></strong> &mdash; <em>Method</em>.</p>
<p>Get a split of <code>batch_size</code> into <code>n_split</code> pieces for data parallelization. Returns a vector of length <code>n_split</code>, with each entry a <code>UnitRange{Int}</code> indicating the slice index for that piece.</p>
<p><a target='_blank' href='https://github.com/apache/mxnet/blob/26a5ad1f39784a60d1564f6f740e5c7bd971cd65/julia/src/model.jl#L48-L52' class='documenter-source'>source</a><br></p>
<p><a id='MXNet.mx.fit-Tuple{FeedForward,AbstractOptimizer,AbstractDataProvider}' href='#MXNet.mx.fit-Tuple{FeedForward,AbstractOptimizer,AbstractDataProvider}'>#</a>
<strong><code>MXNet.mx.fit</code></strong> &mdash; <em>Method</em>.</p>
<pre><code class="julia">fit(model::FeedForward, optimizer, data; kwargs...)
</code></pre>
<p>Train the <code>model</code> on <code>data</code> with the <code>optimizer</code>.</p>
<ul>
<li><code>model::FeedForward</code>: the model to be trained.</li>
<li><code>optimizer::AbstractOptimizer</code>: the optimization algorithm to use.</li>
<li><code>data::AbstractDataProvider</code>: the training data provider.</li>
<li><code>n_epoch::Int</code>: default 10, the number of full data-passes to run.</li>
<li><code>eval_data::AbstractDataProvider</code>: keyword argument, default <code>nothing</code>. The data provider for the validation set.</li>
<li><code>eval_metric::AbstractEvalMetric</code>: keyword argument, default <a href="../metric/#MXNet.mx.Accuracy"><code>Accuracy()</code></a>. The metric used to evaluate the training performance. If <code>eval_data</code> is provided, the same metric is also calculated on the validation set.</li>
<li><code>kvstore</code>: keyword argument, default <code>:local</code>. The key-value store used to synchronize gradients and parameters when multiple devices are used for training. :type kvstore: <code>KVStore</code> or <code>Symbol</code></li>
<li><code>initializer::AbstractInitializer</code>: keyword argument, default <code>UniformInitializer(0.01)</code>.</li>
<li><code>force_init::Bool</code>: keyword argument, default false. By default, the random initialization using the provided <code>initializer</code> will be skipped if the model weights already exists, maybe from a previous call to <a href="./#MXNet.mx.train-Tuple{FeedForward,AbstractOptimizer,AbstractDataProvider}"><code>train</code></a> or an explicit call to <a href="./#MXNet.mx.init_model-Tuple{FeedForward,AbstractInitializer}"><code>init_model</code></a> or <a href="./#MXNet.mx.load_checkpoint-Tuple{AbstractString,Int64,Type{FeedForward}}"><code>load_checkpoint</code></a>. When this option is set, it will always do random initialization at the begining of training.</li>
<li><code>callbacks::Vector{AbstractCallback}</code>: keyword argument, default <code>[]</code>. Callbacks to be invoked at each epoch or mini-batch, see <code>AbstractCallback</code>.</li>
<li><code>verbosity::Int</code>: Determines the verbosity of the print messages. Higher numbers leads to more verbose printing. Acceptable values are - <code>0</code>: Do not print anything during training - <code>1</code>: Print starting and final messages - <code>2</code>: Print one time messages and a message at the start of each epoch - <code>3</code>: Print a summary of the training and validation accuracy for each epoch</li>
<li><code>η_decay::Symbol</code>: <code>:epoch</code> or <code>:batch</code>, decay learning rate on epoch or batch.</li>
</ul>
<p><a target='_blank' href='https://github.com/apache/mxnet/blob/26a5ad1f39784a60d1564f6f740e5c7bd971cd65/julia/src/model.jl#L331-L362' class='documenter-source'>source</a><br></p>
<p><a id='MXNet.mx.init_model-Tuple{FeedForward,AbstractInitializer}' href='#MXNet.mx.init_model-Tuple{FeedForward,AbstractInitializer}'>#</a>
<strong><code>MXNet.mx.init_model</code></strong> &mdash; <em>Method</em>.</p>
<pre><code class="julia">init_model(self, initializer; overwrite=false, input_shapes...)
</code></pre>
<p>Initialize the weights in the model.</p>
<p>This method will be called automatically when training a model. So there is usually no need to call this method unless one needs to inspect a model with only randomly initialized weights.</p>
<p><strong>Arguments:</strong></p>
<ul>
<li><code>self::FeedForward</code>: the model to be initialized.</li>
<li><code>initializer::AbstractInitializer</code>: an initializer describing how the weights should be initialized.</li>
<li><code>overwrite::Bool</code>: keyword argument, force initialization even when weights already exists.</li>
<li><code>input_shapes</code>: the shape of all data and label inputs to this model, given as keyword arguments. For example, <code>data=(28,28,1,100), label=(100,)</code>.</li>
</ul>
<p><a target='_blank' href='https://github.com/apache/mxnet/blob/26a5ad1f39784a60d1564f6f740e5c7bd971cd65/julia/src/model.jl#L77-L92' class='documenter-source'>source</a><br></p>
<p><a id='MXNet.mx.load_checkpoint-Tuple{AbstractString,Int64,Type{FeedForward}}' href='#MXNet.mx.load_checkpoint-Tuple{AbstractString,Int64,Type{FeedForward}}'>#</a>
<strong><code>MXNet.mx.load_checkpoint</code></strong> &mdash; <em>Method</em>.</p>
<pre><code class="julia">load_checkpoint(prefix, epoch, ::mx.FeedForward; context)
</code></pre>
<p>Load a mx.FeedForward model from the checkpoint <em>prefix</em>, <em>epoch</em> and optionally provide a context.</p>
<p><a target='_blank' href='https://github.com/apache/mxnet/blob/26a5ad1f39784a60d1564f6f740e5c7bd971cd65/julia/src/model.jl#L645-L649' class='documenter-source'>source</a><br></p>
<p><a id='MXNet.mx.train-Tuple{FeedForward,AbstractOptimizer,AbstractDataProvider}' href='#MXNet.mx.train-Tuple{FeedForward,AbstractOptimizer,AbstractDataProvider}'>#</a>
<strong><code>MXNet.mx.train</code></strong> &mdash; <em>Method</em>.</p>
<pre><code class="julia">train(model :: FeedForward, ...)
</code></pre>
<p>Alias to <a href="./#MXNet.mx.fit-Tuple{FeedForward,AbstractOptimizer,AbstractDataProvider}"><code>fit</code></a>.</p>
<p><a target='_blank' href='https://github.com/apache/mxnet/blob/26a5ad1f39784a60d1564f6f740e5c7bd971cd65/julia/src/model.jl#L323-L327' class='documenter-source'>source</a><br></p>
</article>
</div>
</div>
</main>
<footer class="md-footer">
<div class="md-footer-nav">
<nav class="md-footer-nav__inner md-grid">
<a href="../context/" title="Context" class="md-flex md-footer-nav__link md-footer-nav__link--prev" rel="prev">
<div class="md-flex__cell md-flex__cell--shrink">
<i class="md-icon md-icon--arrow-back md-footer-nav__button"></i>
</div>
<div class="md-flex__cell md-flex__cell--stretch md-footer-nav__title">
<span class="md-flex__ellipsis">
<span class="md-footer-nav__direction">
Previous
</span>
Context
</span>
</div>
</a>
<a href="../initializer/" title="Initializers" class="md-flex md-footer-nav__link md-footer-nav__link--next" rel="next">
<div class="md-flex__cell md-flex__cell--stretch md-footer-nav__title">
<span class="md-flex__ellipsis">
<span class="md-footer-nav__direction">
Next
</span>
Initializers
</span>
</div>
<div class="md-flex__cell md-flex__cell--shrink">
<i class="md-icon md-icon--arrow-forward md-footer-nav__button"></i>
</div>
</a>
</nav>
</div>
<div class="md-footer-meta md-typeset">
<div class="md-footer-meta__inner md-grid">
<div class="md-footer-copyright">
powered by
<a href="https://www.mkdocs.org">MkDocs</a>
and
<a href="https://squidfunk.github.io/mkdocs-material/">
Material for MkDocs</a>
</div>
</div>
</div>
</footer>
</div>
<script src="../../assets/javascripts/application.808e90bb.js"></script>
<script>app.initialize({version:"1.0.4",url:{base:"../.."}})</script>
<script src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML"></script>
<script src="../../assets/mathjaxhelper.js"></script>
</body>
</html>