WOLFRAM

Enable JavaScript to interact with content and submit forms on Wolfram websites. Learn how
Wolfram Language & System Documentation Center

NetModel ["name"]

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

NetModel [{"name","param1"setting1,}]

obtains a specified model from a parameterized family of models.

NetModel [model,"prop"]

gives property prop of the model.

NetModel []

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

Details
Details and Options Details and Options
Examples  
Basic Examples  
Scope  
Properties & Relations  
See Also
Related Guides
Related Links
History
Cite this Page

NetModel ["name"]

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

NetModel [{"name","param1"setting1,}]

obtains a specified model from a parameterized family of models.

NetModel [model,"prop"]

gives property prop of the model.

NetModel []

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

Details

  • 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:
  • BatchSize Automatic for 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.
  • Information [NetModel[]] gives a report about the network.
  • Information [NetModel[],prop] gives the value of the property prop of NetModel []. Possible properties are the same as for NetGraph .

Examples

open all close all

Basic Examples  (2)

Obtain the trained version of a specific neural net:

Wolfram Language code: net = NetModel["LeNet Trained on MNIST Data"]

Apply the trained net to a set of inputs:

Wolfram Language code: net[{[image], [image], [image]}]

Produce class probabilities for a single input:

Wolfram Language code: net[[image], "Probabilities"]

Obtain a member of a parameterized family:

Wolfram Language code: NetModel[{"BPEmb Subword Embeddings Trained on Wikipedia", "Language" -> "English", "VocabularySize" -> 5000, "Dimensions" -> 25}]

Scope  (9)

Obtain an uninitialized network:

Wolfram Language code: NetModel["LeNet Trained on MNIST Data", "UninitializedEvaluationNet"]

Modify a parameter of the existing NetEncoder of a model:

Wolfram Language code: NetModel["BPEmb Subword Embeddings Trained on Wikipedia", "Input" -> {"IncludeTerminalTokens" -> True}]

Obtain a specific property of a net:

Wolfram Language code: NetModel["LeNet Trained on MNIST Data", "SourceMetadata"]

Obtain the default variant of a parameterized family:

Wolfram Language code: NetModel["BPEmb Subword Embeddings Trained on Wikipedia"]

Get the settings used for the default variant:

Wolfram Language code: NetModel["BPEmb Subword Embeddings Trained on Wikipedia", "DefaultVariant"]

Obtain a specified member of a parameterized family:

Wolfram Language code: NetModel[{"BPEmb Subword Embeddings Trained on Wikipedia", "Language" -> "English", "VocabularySize" -> 5000, "Dimensions" -> 25}]

Get information about the parameters and their allowed values:

Wolfram Language code: NetModel["BPEmb Subword Embeddings Trained on Wikipedia", "ParametersInformation"]

Get explicit settings for all parameters as an association:

Wolfram Language code: NetModel["BPEmb Subword Embeddings Trained on Wikipedia", "ParametersAllowedValues"]//Map[Short]

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

Wolfram Language code: NetModel[{"BPEmb Subword Embeddings Trained on Wikipedia", "Language" -> "English"}, "Variants"]//Length

Obtain a list of all available models:

Wolfram Language code: NetModel[]

Get a report on a model using the Information wrapper:

Wolfram Language code: Information[NetModel["EfficientNet Trained on ImageNet"]]

Extract a specific property:

Wolfram Language code: Information[NetModel["YOLO V5 Trained on MS-COCO Data"], "SummaryGraphic"]

Extract a list of properties:

Wolfram Language code: Information[NetModel["YOLO V5 Trained on MS-COCO Data"], {"InputPorts", "OutputPorts"}]

Get a list of all the available Information properties:

Wolfram Language code: Information[NetModel["YOLO V8 Detect Trained on MS-COCO Data"], "Properties"]

Properties & Relations  (2)

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

Wolfram Language code: NetModel["LeNet Trained on MNIST Data"]
Wolfram Language code: ResourceData["LeNet Trained on MNIST Data"]
Wolfram Language code: ResourceObject["LeNet Trained on MNIST Data"]

Obtain a list of models that have been downloaded:

Wolfram Language code: NetModel["DownloadedModelNames"]

Remove a specific model that has been downloaded:

Wolfram Language code: ResourceRemove[ResourceObject["LeNet Trained on MNIST Data"]]
Wolfram Research (2017), NetModel, Wolfram Language function, https://reference.wolfram.com/language/ref/NetModel.html (updated 2019).

Text

Wolfram Research (2017), NetModel, Wolfram Language function, https://reference.wolfram.com/language/ref/NetModel.html (updated 2019).

CMS

Wolfram Language. 2017. "NetModel." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2019. https://reference.wolfram.com/language/ref/NetModel.html.

APA

Wolfram Language. (2017). NetModel. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/NetModel.html

BibTeX

@misc{reference.wolfram_2026_netmodel, author="Wolfram Research", title="{NetModel}", year="2019", howpublished="\url{https://reference.wolfram.com/language/ref/NetModel.html}", note=[Accessed: 16-August-2026]}

BibLaTeX

@online{reference.wolfram_2026_netmodel, organization={Wolfram Research}, title={NetModel}, year={2019}, url={https://reference.wolfram.com/language/ref/NetModel.html}, note=[Accessed: 16-August-2026]}

Top [フレーム]

AltStyle によって変換されたページ (->オリジナル) /