WLNet (.wlnet)

Background

Import and 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.

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

Examples

Basic Examples  (2)

Define a NetChain:

In[1]:=
Click for copyable input
Out[1]=

Export this net to the WLNet format:

In[2]:=
Click for copyable input
Out[2]=

Import the net:

In[3]:=
Click for copyable input
Out[3]=

Define an initialized NetGraph:

In[1]:=
Click for copyable input
Out[1]=

Export the net along with its initialized parameters:

In[2]:=
Click for copyable input
Out[2]=

Import the network:

In[3]:=
Click for copyable input
Out[3]=

Evaluate the net on input data:

In[4]:=
Click for copyable input
Out[4]=

This is equivalent to evaluating the original net:

In[5]:=
Click for copyable input
Out[5]=

Import a version of the net without any initialized arrays:

In[6]:=
Click for copyable input
Out[6]=

Import an association of arrays:

In[7]:=
Click for copyable input
Out[7]=

See Also

"MXNet"  "WMLF"  "HDF5"  "Real32"  NetGraph  NetChain  NetTrain

Tutorials

Introduced in 2016
(11.0)