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 all close all

Basic Examples  (2)

Obtain the trained version of a specific neural net:

Click for copyable input

Apply the trained net to a set of inputs:

Click for copyable input

Produce class probabilities for a single input:

Click for copyable input

Obtain a member of a parameterized family:

Click for copyable input

Scope  (5)

Properties & Relations  (2)

Introduced in 2017
Updated in 2019