obtains a neural net model with the specified name from the Neural Net Repository.


obtains a specified model from a parameterized family of models.


gives property prop of the model.


gives a dataset of available pre-trained neural net models.


  • A list of available models can be found in the Wolfram Neural Net Repository.
  • NetModel[,"port"->spec] can be used to override the dimensions of an input or output port to the net obtained by NetModel or to attach or modify a NetEncoder or NetDecoder.
  • Possible properties in NetModel[name,prop] include:
  • "ByteCount"size of the evaluation net in bytes
    "ConstructionNotebook"notebook containing explicit network construction
    "EvaluationFunction"complete function to be used for evaluation
    "EvaluationNet"trained net suitable for evaluation
    "InputDomains"domain of inputs to net
    "SourceMetadata"information about the origin of the net
    "TaskType"category of learning task performed by the net
    "TrainingNet"uninitialized architecture used for training
    "TrainingSetData"data resource containing training set used (if available)
    "TrainingSetInformation"information about the training set used to train the net
    "UninitializedEvaluationNet"untrained evaluation net
  • For parameterized models, additional properties include:
  • "DefaultVariant"variant that will be obtained if no parameters are specified
    "ParameterNames"list of parameter names
    "ParametersAllowedValues"association mapping parameter names to their allowed settings
    "ParametersInformation"dataset of information about the parameters
    "Variants"list of variants in the family
  • "SourceMetadata" consists of an association whose keys are based on a subset of properties from the Dublin Core metadata standard, including "Creator", "Date", "Rights", "Source".
  • The effective default value for "EvaluationFunction" is NetModel[,"EvaluationNet"].
  • NetModel may download resources that will be stored in your local object store at $LocalBase, and that can be listed using LocalObjects[] and removed using ResourceRemove.
  • NetModel[][data,opts] specifies that options should be used in applying the net to data. Possible options include:
  • BatchSizeAutomaticfor lists of inputs, the number of inputs to evaluate at once
    NetEvaluationMode"Test"what mode to use in performing evaluation
    TargetDevice"CPU"the target device on which to perform evaluation
    WorkingPrecision"Real32"the numerical precision used for evaluating the net
  • Possible settings for WorkingPrecision include:
  • "Real32"use single-precision real (32-bit)
    "Real64"use double-precision real (64-bit)
    "Mixed"use half-precision real for certain operations
  • WorkingPrecision->"Mixed" is only supported for TargetDevice->"GPU", where it can result in significant performance increases on certain devices.
  • If the output is a NumericArray, then its numeric type is derived from WorkingPrecision.
  • With the setting NetEvaluationMode->"Training", layers such as DropoutLayer will behave as they do for training rather than ordinary evaluation.


open allclose all

Basic Examples  (2)

Obtain the trained version of a specific neural net:

Apply the trained net to a set of inputs:

Produce class probabilities for a single input:

Obtain a member of a parameterized family:

Scope  (5)

Obtain an uninitialized network:

Modify a parameter of the existing NetEncoder of a model:

Obtain a specific property of a net:

Obtain the default variant of a parameterized family:

Get the settings used for the default variant:

Obtain a specified member of a parameterized family:

Get information about the parameters and their allowed values:

Get explicit settings for all parameters as an association:

Get a list of all possible variants of a family consistent with the specification:

Obtain a list of all available models:

Properties & Relations  (2)

The models specified by NetModel are also available via ResourceObject and ResourceData:

Obtain a list of models that have been downloaded:

Remove a specific model that has been downloaded:

Wolfram Research (2017), NetModel, Wolfram Language function, (updated 2019).


Wolfram Research (2017), NetModel, Wolfram Language function, (updated 2019).


Wolfram Language. 2017. "NetModel." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2019.


Wolfram Language. (2017). NetModel. Wolfram Language & System Documentation Center. Retrieved from


@misc{reference.wolfram_2024_netmodel, author="Wolfram Research", title="{NetModel}", year="2019", howpublished="\url{}", note=[Accessed: 19-July-2024 ]}


@online{reference.wolfram_2024_netmodel, organization={Wolfram Research}, title={NetModel}, year={2019}, url={}, note=[Accessed: 19-July-2024 ]}