WLNet (.wlnet)

Background & Context

    • Used for storing trained and untrained neural nets.
    • Binary format.
    • Developed at Wolfram Research.

Import & Export

  • Import["file.wlnet"] imports the net stored in the specified file, returning it as a NetGraph or similar construct.
  • Export["file.wlnet",expr] exports the NetGraph or similar construct expr to a file.

Import Elements

  • Import elements include:
  • "Net"the net, including all initialized arrays
    "UninitializedNet"the net, without any arrays
    "ArrayList"parameter arrays as a list
    "ArrayAssociation"parameter arrays as an association
    "WLVersion"version of the Wolfram Language used to create the file


Basic Examples  (2)

Define a NetChain:

Export this net to the WLNet format:

Import the net:

Define an initialized NetGraph:

Export the net along with its initialized parameters:

Import the network:

Evaluate the net on input data:

This is equivalent to evaluating the original net:

Import a version of the net without any initialized arrays:

Import an association of arrays:

Introduced in 2016