Wolfram Neural Net Repository
Immediate Computable Access to Neural Net Models
Turn horses into zebras in a photo
Number of layers: 94 | Parameter count: 2,855,811 | Trained size: 12 MB |
Get the pre-trained net:
In[1]:= | ![]() |
Out[1]= | ![]() |
Run the net on a photo:
In[2]:= | ![]() |
Out[2]= | ![]() |
Automatic image resizing can be avoided by replacing the net encoders. First get the net:
In[3]:= | ![]() |
Out[3]= | ![]() |
Get a photo:
In[4]:= | ![]() |
Create a new encoder with the desired dimensions:
In[5]:= | ![]() |
Out[5]= | ![]() |
Attach the new net encoder and run the network:
In[6]:= | ![]() |
Out[6]= | ![]() |
In[7]:= | ![]() |
Out[7]= | ![]() |
Inspect the sizes of all arrays in the net:
In[8]:= | ![]() |
Out[8]= | ![]() |
Obtain the total number of parameters:
In[9]:= | ![]() |
Out[9]= | ![]() |
Obtain the layer type counts:
In[10]:= | ![]() |
Out[10]= | ![]() |
Display the summary graphic:
In[11]:= | ![]() |
Out[11]= | ![]() |
Export the net into a format that can be opened in MXNet:
In[12]:= | ![]() |
Out[12]= | ![]() |
Export also creates a net.params file containing parameters:
In[13]:= | ![]() |
Out[13]= | ![]() |
Get the size of the parameter file:
In[14]:= | ![]() |
Out[14]= | ![]() |
The size is similar to the byte count of the resource object:
In[15]:= | ![]() |
Out[15]= | ![]() |
Represent the MXNet net as a graph:
In[16]:= | ![]() |
Out[16]= | ![]() |
Wolfram Language 11.3 (March 2018) or above