Wolfram Neural Net Repository
Immediate Computable Access to Neural Net Models
Represent words as vectors
Number of layers: 1 | Parameter count: 125,158,500 | Trained size: 503 MB |
Get the pre-trained net:
In[1]:= | ![]() |
Out[1]= | ![]() |
Use the net to obtain a list of word vectors:
In[2]:= | ![]() |
Out[2]= | ![]() |
Obtain the dimensions of the vectors:
In[3]:= | ![]() |
Out[3]= | ![]() |
Use the embedding layer inside a NetChain:
In[4]:= | ![]() |
Out[4]= | ![]() |
Create two lists of related words:
In[5]:= | ![]() |
In[6]:= | ![]() |
Visualize relationships between the words using the net as a feature extractor:
In[7]:= | ![]() |
Out[7]= | ![]() |
Get the pre-trained net:
In[8]:= | ![]() |
Out[8]= | ![]() |
Get a list of tokens:
In[9]:= | ![]() |
Out[9]= | ![]() |
Obtain the vectors:
In[10]:= | ![]() |
Create an association whose keys are tokens and whose values are vectors:
In[11]:= | ![]() |
Find the eight nearest tokens to "king":
In[12]:= | ![]() |
Out[12]= | ![]() |
France is to Paris as Germany is to:
In[13]:= | ![]() |
Out[13]= | ![]() |
Inspect the number of parameters of all arrays in the net:
In[14]:= | ![]() |
Out[14]= | ![]() |
Obtain the total number of parameters:
In[15]:= | ![]() |
Out[15]= | ![]() |
Obtain the layer type counts:
In[16]:= | ![]() |
Out[16]= | ![]() |
Export the net into a format that can be opened in MXNet:
In[17]:= | ![]() |
Out[17]= | ![]() |
Export also creates a net.params file containing parameters:
In[18]:= | ![]() |
Out[18]= | ![]() |
Get the size of the parameter file:
In[19]:= | ![]() |
Out[19]= | ![]() |
The size is similar to the byte count of the resource object:
In[20]:= | ![]() |
Out[20]= | ![]() |
Represent the MXNet net as a graph:
In[21]:= | ![]() |
Out[21]= | ![]() |
Wolfram Language 11.3 (March 2018) or above