This is a quick Mariana example to showcase:

  • The installation
  • How to a neural network with a skip connection
  • How to visualize the architecture
  • How to train and test a model
  • How to get any layer's output
  • How create mix-in functions for debugging and train several outputs
  • Get the gradients and outputs of any layer for debugging and interpretation

In [2]:
#!kill -9 -1
!pip install git+https://github.com/Theano/Theano
!pip install git+https://github.com/Lasagne/Lasagne
!pip install git+https://github.com/tariqdaouda/Mariana


Collecting git+https://github.com/Theano/Theano
  Cloning https://github.com/Theano/Theano to /tmp/pip-req-build-LImt5D
Requirement already satisfied: numpy>=1.9.1 in /usr/local/lib/python2.7/dist-packages (from Theano==1.0.2) (1.14.3)
Requirement already satisfied: scipy>=0.14 in /usr/local/lib/python2.7/dist-packages (from Theano==1.0.2) (0.19.1)
Requirement already satisfied: six>=1.9.0 in /usr/local/lib/python2.7/dist-packages (from Theano==1.0.2) (1.11.0)
Building wheels for collected packages: Theano
  Running setup.py bdist_wheel for Theano ... - \ | / - \ | / - done
  Stored in directory: /tmp/pip-ephem-wheel-cache-55Rdzf/wheels/64/f2/f4/6b1f50baf18aca2eab5d9b5a431b90e3d8be4711c8f7457eb7
Successfully built Theano
Installing collected packages: Theano
Successfully installed Theano-1.0.2
Collecting git+https://github.com/Lasagne/Lasagne
  Cloning https://github.com/Lasagne/Lasagne to /tmp/pip-req-build-pocfxC
Requirement already satisfied: numpy in /usr/local/lib/python2.7/dist-packages (from Lasagne==0.2.dev1) (1.14.3)
Building wheels for collected packages: Lasagne
  Running setup.py bdist_wheel for Lasagne ... - done
  Stored in directory: /tmp/pip-ephem-wheel-cache-2482Ax/wheels/c4/20/90/9f7242c381402829c5918261e3eb51a87bc1d8521456749b57
Successfully built Lasagne
Installing collected packages: Lasagne
Successfully installed Lasagne-0.2.dev1
Collecting git+https://github.com/tariqdaouda/Mariana
  Cloning https://github.com/tariqdaouda/Mariana to /tmp/pip-req-build-Bm1ZWE
Requirement already satisfied: theano in /usr/local/lib/python2.7/dist-packages (from Mariana==2.0.0rc1) (1.0.2)
Collecting pyGeno (from Mariana==2.0.0rc1)
  Downloading https://files.pythonhosted.org/packages/2e/f8/3e7b1aa849e7100109559f0cc4b1ec872794cecf301d76db267dc67a6e1e/pyGeno-1.3.1.tar.gz (7.1MB)
    100% |████████████████████████████████| 7.1MB 3.0MB/s 
Collecting simplejson (from Mariana==2.0.0rc1)
  Downloading https://files.pythonhosted.org/packages/8b/6c/c512c32124d1d2d67a32ff867bb3cdd5bfa6432660975f7ee753ed7ad886/simplejson-3.15.0.tar.gz (80kB)
    100% |████████████████████████████████| 81kB 20.3MB/s 
Requirement already satisfied: numpy in /usr/local/lib/python2.7/dist-packages (from Mariana==2.0.0rc1) (1.14.3)
Requirement already satisfied: Lasagne in /usr/local/lib/python2.7/dist-packages (from Mariana==2.0.0rc1) (0.2.dev1)
Requirement already satisfied: six>=1.9.0 in /usr/local/lib/python2.7/dist-packages (from theano->Mariana==2.0.0rc1) (1.11.0)
Requirement already satisfied: scipy>=0.14 in /usr/local/lib/python2.7/dist-packages (from theano->Mariana==2.0.0rc1) (0.19.1)
Collecting rabaDB>=1.0.4 (from pyGeno->Mariana==2.0.0rc1)
  Downloading https://files.pythonhosted.org/packages/11/10/e8397c370efd954209089319b3d842a1689499a5b5c20812e5094d32b83f/rabaDB-1.0.5.tar.gz
Building wheels for collected packages: Mariana, pyGeno, simplejson, rabaDB
  Running setup.py bdist_wheel for Mariana ... - done
  Stored in directory: /tmp/pip-ephem-wheel-cache-nnk3G1/wheels/1f/ca/1b/22d3ed05d19c6b64cb8bd1e926058a1cf23ede03cc3a0d2eda
  Running setup.py bdist_wheel for pyGeno ... - \ | done
  Stored in directory: /content/.cache/pip/wheels/7c/74/4a/0c0e7cc9694e01e46419e890cfaff79671ff70457cd9cfe7af
  Running setup.py bdist_wheel for simplejson ... - \ done
  Stored in directory: /content/.cache/pip/wheels/2c/96/fb/b63af7400da79753dcd2a3f9bf5e7a3010e8d0233844445c2c
  Running setup.py bdist_wheel for rabaDB ... - done
  Stored in directory: /content/.cache/pip/wheels/ad/ab/a0/860907dc9ef89c041fbb4627dc11d9c05de0808939b6539b3e
Successfully built Mariana pyGeno simplejson rabaDB
Installing collected packages: rabaDB, pyGeno, simplejson, Mariana
Successfully installed Mariana-2.0.0rc1 pyGeno-1.3.1 rabaDB-1.0.5 simplejson-3.15.0

In [0]:


In [14]:
import Mariana.layers as ML
import Mariana.scenari as MS
import Mariana.costs as MC
import Mariana.activations as MA
import Mariana.regularizations as MR

import Mariana.settings as MSET
import numpy

ls = MS.GradientDescent(lr = 0.01, momentum=0.9)
cost = MC.NegativeLogLikelihood()

inp = ML.Input(28*28, name = "InputLayer")
h1 = ML.Hidden(300, activation = MA.ReLU(), name = "Hidden1", regularizations = [ MR.L1(0.0001) ])
h2 = ML.Hidden(300, activation = MA.ReLU(), name = "Hidden2", regularizations = [ MR.L1(0.0001) ])
o = ML.SoftmaxClassifier(10, learningScenari = [ls], cost = cost, name = "Probabilities1")
o.addNote("This is a note on the output layer", "I am the output layer")

#Connecting layers
inp > h1 > h2
concat = ML.C([inp, h2], name="Concatenation")

MLP_skip = concat > o
MLP_skip.addNote("This is a note on the model", "This is the skip connection example. Notes make it easier to collaborate")
MLP_skip.init()


>|\/| /-\ |-> | /-\ |\| /-\>

In [13]:
#Visualizing
MLP_skip.view("mySkipMLP")


mySkipMLP

mySkipMLP

This is a note on the model

This is the skip connection example. Notes make it easier to collaborate


In [0]:
print "->train:\n", MLP_skip["Probabilities"].train({"InputLayer.inputs": [numpy.ones(784)], "Probabilities.targets": [1]})
print "---"
print "->test:\n", MLP_skip["Probabilities"].test({"InputLayer.inputs": [numpy.ones(784)], "Probabilities.targets": [1]})
print "---"

print "->the output of the first hidden layer, on the stream 'train' (has regularisations):\n", MLP_skip["Hidden1"].propagate["train"]({"InputLayer.inputs": [numpy.ones(784)]})
print "---"
print "->the output of the last layer, on the stream 'test' (no regularisations):\n", MLP_skip["Probabilities"].propagate["test"]({"InputLayer.inputs": [numpy.ones(784)]})
print "---"

#mix-in function: output on the second hidden + test score
f =  MLP_skip["Hidden2"].propagate["test"] + MLP_skip["Probabilities"].test
print "->mix-in outputs:\n", f({"InputLayer.inputs": [numpy.ones(784)], "Probabilities.targets": [1]})

In [15]:
ls = MS.GradientDescent(lr = 0.01, momentum=0.9)
cost = MC.NegativeLogLikelihood()

inp = ML.Input(28*28, name = "InputLayer")
h1 = ML.Hidden(300, activation = MA.ReLU(), name = "Hidden1", regularizations = [ MR.L1(0.0001) ])
h2 = ML.Hidden(300, activation = MA.ReLU(), name = "Hidden2", regularizations = [ MR.L1(0.0001) ])
o1 = ML.SoftmaxClassifier(10, learningScenari = [ls], cost = cost, name = "Probabilities1")
o2 = ML.SoftmaxClassifier(3, learningScenari = [ls], cost = cost, name = "Probabilities2")

#Connecting layers
inp > h1 > h2
concat = ML.C([inp, h2], name="Concatenation")

h1 > o1
MLP_skip = concat > o2

MLP_skip.addNote("This is a note on the model", "This model has two outputs")
MLP_skip.init()


>|\/| /-\ |-> | /-\ |\| /-\>

In [17]:
#Visualizing
MLP_skip.view("mySkipMLP")


mySkipMLP

mySkipMLP

This is a note on the model

This model has two outputs


In [28]:
print "->train on fisrt output:\n", MLP_skip["Probabilities1"].train({"InputLayer.inputs": [numpy.ones(784)], "Probabilities1.targets": [1]})
print "---"

#mix-in function: train on both outputs
f =  MLP_skip["Probabilities1"].train + MLP_skip["Probabilities2"].train
print "->mix-in outputs:\n", f({"InputLayer.inputs": [numpy.ones(784)], "Probabilities1.targets": [1], "Probabilities2.targets": [0]})


->train on fisrt output:
OrderedDict([('Probabilities1.drive.train', array(9.08210724e-06))])
---
->mix-in outputs:
OrderedDict([('Probabilities1.drive.train', array(2.71914144e-06)), ('Probabilities2.drive.train', array(3.11565855))])

In [30]:
#Get the gradients for debugging and interpretation
MLP_skip["Probabilities1"].train.getGradients({"InputLayer.inputs": [numpy.ones(784)], "Probabilities1.targets": [1]})


Out[30]:
OrderedDict([('Hidden1.b',
              array([ 0.00000000e+00,  0.00000000e+00, -1.51440640e-07,  0.00000000e+00,
                      0.00000000e+00,  0.00000000e+00,  0.00000000e+00,  0.00000000e+00,
                      0.00000000e+00,  0.00000000e+00, -2.11944325e-07,  0.00000000e+00,
                     -8.45051287e-08, -3.29868775e-07,  0.00000000e+00,  0.00000000e+00,
                     -1.93888435e-08,  0.00000000e+00,  0.00000000e+00,  0.00000000e+00,
                      0.00000000e+00, -2.65512340e-07,  8.64366131e-08,  0.00000000e+00,
                      0.00000000e+00,  0.00000000e+00,  0.00000000e+00, -1.24948273e-08,
                     -2.46019679e-07,  0.00000000e+00,  0.00000000e+00,  0.00000000e+00,
                      0.00000000e+00, -1.22970078e-08,  0.00000000e+00,  1.97720300e-07,
                      0.00000000e+00,  0.00000000e+00,  0.00000000e+00,  0.00000000e+00,
                      0.00000000e+00,  0.00000000e+00, -1.65620081e-07,  0.00000000e+00,
                      0.00000000e+00,  0.00000000e+00, -1.32481057e-07,  0.00000000e+00,
                      0.00000000e+00, -6.08194523e-08,  0.00000000e+00,  0.00000000e+00,
                      0.00000000e+00,  5.81935868e-08, -5.84462816e-08, -1.56930349e-07,
                      8.60929811e-09,  0.00000000e+00,  0.00000000e+00,  0.00000000e+00,
                      4.93658236e-08, -1.84526200e-07,  0.00000000e+00, -3.14566429e-07,
                      0.00000000e+00,  0.00000000e+00,  0.00000000e+00,  7.00792790e-08,
                      0.00000000e+00,  1.26540198e-07,  0.00000000e+00,  0.00000000e+00,
                      0.00000000e+00, -3.93229324e-08,  0.00000000e+00, -5.72147911e-07,
                     -2.27079875e-07,  0.00000000e+00,  4.10745621e-08,  0.00000000e+00,
                      0.00000000e+00,  0.00000000e+00, -2.02455513e-07, -1.72548647e-07,
                     -1.75144999e-07,  0.00000000e+00,  0.00000000e+00, -1.89935493e-07,
                      0.00000000e+00, -1.86882820e-07,  0.00000000e+00,  0.00000000e+00,
                     -1.27546771e-08, -2.11789876e-07,  0.00000000e+00, -4.57477516e-07,
                     -3.43445307e-07,  2.19564985e-08, -5.97082067e-07, -3.61617158e-08,
                      0.00000000e+00,  0.00000000e+00, -2.37156055e-07, -1.34966324e-07,
                      0.00000000e+00, -7.44587445e-08, -1.26109273e-07,  0.00000000e+00,
                     -3.47191760e-07,  0.00000000e+00,  0.00000000e+00,  0.00000000e+00,
                      0.00000000e+00, -1.95023644e-07, -1.58811511e-08,  0.00000000e+00,
                     -6.75413584e-08,  0.00000000e+00,  0.00000000e+00, -4.94527696e-07,
                     -2.48081718e-07,  0.00000000e+00,  0.00000000e+00,  0.00000000e+00,
                      0.00000000e+00,  0.00000000e+00,  0.00000000e+00, -3.78809062e-07,
                     -2.53247795e-07,  3.32523530e-08,  0.00000000e+00,  0.00000000e+00,
                      0.00000000e+00,  2.17325775e-07,  5.06991380e-09,  0.00000000e+00,
                      0.00000000e+00,  1.18529806e-07,  0.00000000e+00,  0.00000000e+00,
                      0.00000000e+00,  0.00000000e+00,  0.00000000e+00,  7.00818330e-08,
                     -1.53581990e-07, -1.81760391e-07,  0.00000000e+00,  0.00000000e+00,
                     -4.86779420e-07, -2.39937422e-07, -1.76282489e-07, -1.44248390e-07,
                      0.00000000e+00,  0.00000000e+00,  0.00000000e+00,  3.36340071e-08,
                      0.00000000e+00,  0.00000000e+00,  2.13194344e-07, -2.71212920e-08,
                      0.00000000e+00, -1.05014579e-07,  0.00000000e+00, -1.26743024e-07,
                      0.00000000e+00,  0.00000000e+00, -2.03868213e-07, -1.45612965e-07,
                      0.00000000e+00,  0.00000000e+00,  0.00000000e+00,  0.00000000e+00,
                      0.00000000e+00,  0.00000000e+00,  0.00000000e+00,  8.54931305e-08,
                      0.00000000e+00,  0.00000000e+00, -3.29694996e-07,  0.00000000e+00,
                     -6.68591480e-08,  3.53386754e-08,  0.00000000e+00, -1.52685408e-07,
                      0.00000000e+00,  0.00000000e+00, -8.33013923e-08,  0.00000000e+00,
                      0.00000000e+00,  0.00000000e+00,  1.75120233e-07, -6.74309758e-08,
                      0.00000000e+00,  0.00000000e+00,  0.00000000e+00,  0.00000000e+00,
                      0.00000000e+00, -2.09556698e-07,  0.00000000e+00,  0.00000000e+00,
                     -1.35095698e-07,  0.00000000e+00, -3.09324895e-07,  0.00000000e+00,
                     -1.67404823e-07,  0.00000000e+00, -2.82500020e-07, -4.09836435e-08,
                      3.20681591e-08,  0.00000000e+00, -3.76968672e-07, -2.83455635e-07,
                      0.00000000e+00,  0.00000000e+00,  0.00000000e+00,  0.00000000e+00,
                     -3.99860741e-07, -5.43957936e-08,  0.00000000e+00, -8.75045694e-08,
                      0.00000000e+00,  0.00000000e+00,  0.00000000e+00,  0.00000000e+00,
                      0.00000000e+00,  0.00000000e+00, -2.33373539e-07,  0.00000000e+00,
                      8.98120809e-08,  0.00000000e+00, -1.09677008e-07,  0.00000000e+00,
                     -1.79434179e-07,  0.00000000e+00, -2.32020621e-07, -1.04827456e-07,
                      0.00000000e+00,  0.00000000e+00, -2.58646132e-07, -2.14802375e-07,
                     -3.39904721e-07,  0.00000000e+00, -1.30528559e-07,  0.00000000e+00,
                      0.00000000e+00,  0.00000000e+00,  0.00000000e+00,  0.00000000e+00,
                     -7.31538990e-09,  0.00000000e+00,  0.00000000e+00, -1.25133696e-07,
                     -2.43051234e-07, -4.61787118e-07,  0.00000000e+00,  0.00000000e+00,
                      7.23666588e-08,  0.00000000e+00,  0.00000000e+00,  0.00000000e+00,
                      4.70579691e-08,  0.00000000e+00,  0.00000000e+00,  0.00000000e+00,
                      0.00000000e+00, -2.50880464e-07, -2.90441737e-08,  0.00000000e+00,
                      0.00000000e+00,  0.00000000e+00, -5.18450782e-07,  0.00000000e+00,
                      0.00000000e+00,  0.00000000e+00,  0.00000000e+00,  0.00000000e+00,
                      0.00000000e+00, -4.44542484e-07,  1.57389788e-07,  0.00000000e+00,
                      0.00000000e+00,  0.00000000e+00,  2.28660170e-07,  0.00000000e+00,
                      0.00000000e+00, -3.65161484e-07,  0.00000000e+00,  0.00000000e+00,
                      0.00000000e+00,  2.71305695e-07, -1.06095190e-08,  0.00000000e+00,
                     -4.13253672e-07,  0.00000000e+00,  2.72072884e-07,  0.00000000e+00,
                      0.00000000e+00,  0.00000000e+00,  0.00000000e+00,  0.00000000e+00])),
             ('Probabilities1.W',
              array([[ 0.00000000e+00,  0.00000000e+00,  0.00000000e+00, ...,
                       0.00000000e+00,  0.00000000e+00,  0.00000000e+00],
                     [ 0.00000000e+00,  0.00000000e+00,  0.00000000e+00, ...,
                       0.00000000e+00,  0.00000000e+00,  0.00000000e+00],
                     [ 1.32662808e-07, -3.55292520e-06,  1.08867157e-06, ...,
                       5.67285648e-07,  1.79349404e-07,  5.92238387e-07],
                     ...,
                     [ 0.00000000e+00,  0.00000000e+00,  0.00000000e+00, ...,
                       0.00000000e+00,  0.00000000e+00,  0.00000000e+00],
                     [ 0.00000000e+00,  0.00000000e+00,  0.00000000e+00, ...,
                       0.00000000e+00,  0.00000000e+00,  0.00000000e+00],
                     [ 0.00000000e+00,  0.00000000e+00,  0.00000000e+00, ...,
                       0.00000000e+00,  0.00000000e+00,  0.00000000e+00]])),
             ('Hidden1.W',
              array([[-0.0001    , -0.0001    , -0.00010015, ...,  0.0001    ,
                      -0.0001    , -0.0001    ],
                     [ 0.0001    , -0.0001    , -0.00010015, ..., -0.0001    ,
                       0.0001    , -0.0001    ],
                     [-0.0001    , -0.0001    , -0.00010015, ..., -0.0001    ,
                      -0.0001    ,  0.0001    ],
                     ...,
                     [-0.0001    ,  0.0001    , -0.00010015, ..., -0.0001    ,
                       0.0001    , -0.0001    ],
                     [ 0.0001    , -0.0001    , -0.00010015, ..., -0.0001    ,
                      -0.0001    ,  0.0001    ],
                     [-0.0001    , -0.0001    , -0.00010015, ..., -0.0001    ,
                       0.0001    , -0.0001    ]])),
             ('Probabilities1.b',
              array([ 1.01529987e-07, -2.71913775e-06,  8.33186122e-07,  7.39746017e-08,
                      8.77679988e-08,  5.05009588e-07,  9.29979193e-08,  4.34157133e-07,
                      1.37260344e-07,  4.53254054e-07]))])

In [29]:
#Get the updates for debugging and interpretation
MLP_skip["Probabilities1"].train.getUpdates({"InputLayer.inputs": [numpy.ones(784)], "Probabilities1.targets": [1]})


Out[29]:
OrderedDict([('Hidden1.b',
              array([ 0.00000000e+00,  0.00000000e+00,  1.34647880e-03,  0.00000000e+00,
                      0.00000000e+00,  0.00000000e+00,  0.00000000e+00,  0.00000000e+00,
                      0.00000000e+00,  0.00000000e+00,  8.48849536e-04,  0.00000000e+00,
                     -4.02560261e-05,  2.22665159e-03,  0.00000000e+00,  0.00000000e+00,
                     -1.96807503e-04,  0.00000000e+00, -1.69743639e-03,  0.00000000e+00,
                      0.00000000e+00,  2.17963700e-03, -1.07524098e-03,  0.00000000e+00,
                      0.00000000e+00,  0.00000000e+00, -2.59541859e-03, -1.61847860e-03,
                      2.26993545e-03, -1.04499160e-03, -1.73618232e-03,  0.00000000e+00,
                      0.00000000e+00, -2.18082692e-04,  0.00000000e+00, -1.88735617e-03,
                      0.00000000e+00,  0.00000000e+00,  0.00000000e+00,  0.00000000e+00,
                      0.00000000e+00,  0.00000000e+00,  9.94986334e-04,  0.00000000e+00,
                      0.00000000e+00, -9.18299213e-04,  1.02780545e-04,  0.00000000e+00,
                      0.00000000e+00, -1.23485384e-04,  0.00000000e+00, -2.05070289e-03,
                      0.00000000e+00, -9.56866453e-04, -3.35028715e-04,  1.61693060e-03,
                     -1.20825866e-04,  0.00000000e+00,  0.00000000e+00,  0.00000000e+00,
                      6.64830328e-04,  7.97307791e-04,  0.00000000e+00,  2.18433587e-03,
                      0.00000000e+00,  0.00000000e+00, -1.86547522e-03, -1.36430322e-03,
                      0.00000000e+00, -1.27746298e-03,  0.00000000e+00,  0.00000000e+00,
                      0.00000000e+00, -9.65450793e-04,  0.00000000e+00,  2.84429050e-03,
                      7.79130317e-04, -2.09953467e-03, -4.33320229e-04,  0.00000000e+00,
                      0.00000000e+00,  0.00000000e+00, -2.25217849e-04,  6.49607924e-04,
                      8.30783556e-04,  0.00000000e+00,  0.00000000e+00,  1.69091171e-03,
                      0.00000000e+00,  1.16761124e-03, -2.91348748e-03,  0.00000000e+00,
                      4.03448998e-04,  2.42187042e-04,  0.00000000e+00,  3.31536738e-03,
                      2.62294508e-03, -1.19767344e-04,  3.12220519e-03,  6.08884319e-04,
                     -2.60828442e-03, -3.10020593e-03,  2.60553765e-03, -2.15235143e-05,
                      0.00000000e+00,  4.51284505e-04, -1.02537862e-04,  0.00000000e+00,
                      1.94051025e-03, -1.90192150e-03,  0.00000000e+00,  0.00000000e+00,
                      0.00000000e+00,  9.21169254e-04, -4.96632337e-04,  0.00000000e+00,
                      1.01029547e-03,  0.00000000e+00,  0.00000000e+00,  1.41269408e-03,
                      1.10460553e-03,  0.00000000e+00, -3.17678100e-03,  0.00000000e+00,
                      0.00000000e+00,  0.00000000e+00,  0.00000000e+00,  2.90763185e-03,
                      1.13008946e-03,  9.26344540e-04, -1.04658351e-03, -2.08606178e-03,
                      0.00000000e+00, -7.19384722e-04,  1.07522502e-03, -2.74519214e-03,
                      0.00000000e+00, -1.02028108e-03,  0.00000000e+00,  0.00000000e+00,
                      0.00000000e+00,  0.00000000e+00,  0.00000000e+00, -1.91227714e-03,
                     -1.78764971e-04,  1.41518995e-03,  0.00000000e+00,  0.00000000e+00,
                      2.96766872e-03,  1.48083560e-03,  1.19553234e-03,  7.18897373e-04,
                      0.00000000e+00,  0.00000000e+00,  0.00000000e+00, -5.27228553e-04,
                      0.00000000e+00,  0.00000000e+00, -2.12193559e-03,  2.94555924e-04,
                      0.00000000e+00,  1.20982687e-03,  0.00000000e+00,  1.19083139e-03,
                      0.00000000e+00,  0.00000000e+00,  5.55178807e-04,  1.41555877e-03,
                      0.00000000e+00,  0.00000000e+00,  0.00000000e+00,  0.00000000e+00,
                      0.00000000e+00,  0.00000000e+00, -2.01147885e-03,  5.81348298e-04,
                      0.00000000e+00,  0.00000000e+00,  2.98715488e-03,  0.00000000e+00,
                      1.42425901e-03, -8.27788152e-05,  0.00000000e+00,  7.72222135e-04,
                      0.00000000e+00,  0.00000000e+00,  8.01247478e-04,  0.00000000e+00,
                      0.00000000e+00,  0.00000000e+00, -7.66115096e-04, -7.82680950e-04,
                     -1.51568017e-03,  0.00000000e+00, -1.22228509e-03,  0.00000000e+00,
                      0.00000000e+00,  5.50177632e-04, -3.17134989e-03,  0.00000000e+00,
                     -1.75817537e-04,  0.00000000e+00,  1.13000141e-03,  0.00000000e+00,
                      8.61101732e-04, -1.21781216e-03,  1.65067116e-03,  2.66864417e-04,
                     -1.09295624e-03,  0.00000000e+00,  1.79242970e-03,  1.65655799e-03,
                      0.00000000e+00,  0.00000000e+00,  0.00000000e+00,  0.00000000e+00,
                      2.45448832e-03,  1.86823925e-04,  0.00000000e+00, -5.72054779e-05,
                     -1.15094897e-03,  0.00000000e+00, -3.34405186e-03,  0.00000000e+00,
                      0.00000000e+00,  0.00000000e+00, -9.75154770e-04,  0.00000000e+00,
                     -5.56922067e-04, -4.40392389e-04,  1.29051488e-03, -1.48277189e-03,
                      1.94121839e-03,  0.00000000e+00,  1.74576733e-03,  1.02305724e-03,
                      0.00000000e+00,  0.00000000e+00,  1.93963213e-03,  1.02541851e-03,
                      1.60393944e-03, -1.28470931e-03,  9.60136756e-04,  0.00000000e+00,
                     -1.68770815e-03,  0.00000000e+00,  0.00000000e+00,  0.00000000e+00,
                     -9.76542690e-04,  0.00000000e+00,  0.00000000e+00, -1.01681949e-04,
                      8.52005559e-04,  2.73401191e-03, -8.72021963e-04,  0.00000000e+00,
                     -5.64307753e-05,  0.00000000e+00,  0.00000000e+00, -3.05852029e-03,
                     -1.49437639e-03,  0.00000000e+00,  0.00000000e+00,  0.00000000e+00,
                     -2.80414420e-03,  4.31460784e-04, -1.58136825e-03,  0.00000000e+00,
                      0.00000000e+00,  0.00000000e+00,  2.50055798e-03,  0.00000000e+00,
                      0.00000000e+00, -1.40282969e-03,  0.00000000e+00,  0.00000000e+00,
                      0.00000000e+00,  1.11020948e-03, -8.60257371e-04,  0.00000000e+00,
                      0.00000000e+00,  0.00000000e+00, -2.35308981e-03,  0.00000000e+00,
                      0.00000000e+00,  5.66017806e-04,  0.00000000e+00,  0.00000000e+00,
                     -2.15030922e-03, -1.09800252e-03, -1.27551021e-04, -2.35079730e-03,
                      2.12463431e-03,  0.00000000e+00, -1.51184543e-03, -1.65298268e-03,
                      0.00000000e+00,  0.00000000e+00,  0.00000000e+00,  0.00000000e+00])),
             ('Hidden1.b.momentum',
              array([ 0.00000000e+00,  0.00000000e+00, -9.07307091e-03,  0.00000000e+00,
                      0.00000000e+00,  0.00000000e+00,  0.00000000e+00,  0.00000000e+00,
                      0.00000000e+00,  0.00000000e+00, -5.77540960e-03,  0.00000000e+00,
                      1.91361055e-04, -1.50533589e-02,  0.00000000e+00,  0.00000000e+00,
                      1.30471102e-03,  0.00000000e+00,  1.07004881e-02,  0.00000000e+00,
                      0.00000000e+00, -1.46039444e-02,  7.21588214e-03,  0.00000000e+00,
                      0.00000000e+00,  0.00000000e+00,  1.74581530e-02,  1.06435899e-02,
                     -1.52925051e-02,  6.86585400e-03,  1.16183629e-02,  0.00000000e+00,
                      0.00000000e+00,  1.45171829e-03,  0.00000000e+00,  1.27046072e-02,
                      0.00000000e+00,  0.00000000e+00,  0.00000000e+00,  0.00000000e+00,
                      0.00000000e+00,  0.00000000e+00, -6.73745573e-03,  0.00000000e+00,
                      0.00000000e+00,  5.34819602e-03, -7.59250975e-04,  0.00000000e+00,
                      0.00000000e+00,  7.46641533e-04,  0.00000000e+00,  1.36468358e-02,
                      0.00000000e+00,  6.40614540e-03,  2.15335988e-03, -1.07415446e-02,
                      8.23274151e-04,  0.00000000e+00,  0.00000000e+00,  0.00000000e+00,
                     -4.32382711e-03, -5.47382903e-03,  0.00000000e+00, -1.48246118e-02,
                      0.00000000e+00,  0.00000000e+00,  1.25864349e-02,  9.12409204e-03,
                      0.00000000e+00,  8.69962730e-03,  0.00000000e+00,  0.00000000e+00,
                      0.00000000e+00,  6.31276617e-03,  0.00000000e+00, -1.94157858e-02,
                     -5.32896658e-03,  1.40829452e-02,  2.96906506e-03,  0.00000000e+00,
                      0.00000000e+00,  0.00000000e+00,  1.38698910e-03, -4.43303494e-03,
                     -5.67770681e-03,  0.00000000e+00,  0.00000000e+00, -1.13589356e-02,
                      0.00000000e+00, -7.97088523e-03,  1.96650648e-02,  0.00000000e+00,
                     -2.72307949e-03, -1.76051099e-03,  0.00000000e+00, -2.23982229e-02,
                     -1.76001444e-02,  8.24574515e-04, -2.12137332e-02, -4.08889010e-03,
                      1.74541586e-02,  2.08648545e-02, -1.74488404e-02,  1.73481350e-06,
                      0.00000000e+00, -3.02483366e-03,  6.27642236e-04,  0.00000000e+00,
                     -1.31027259e-02,  1.27289393e-02,  0.00000000e+00,  0.00000000e+00,
                      0.00000000e+00, -6.25095625e-03,  3.34304062e-03,  0.00000000e+00,
                     -6.76403440e-03,  0.00000000e+00,  0.00000000e+00, -9.87366618e-03,
                     -7.59051850e-03,  0.00000000e+00,  2.12898804e-02,  0.00000000e+00,
                      0.00000000e+00,  0.00000000e+00,  0.00000000e+00, -1.95440493e-02,
                     -7.69093410e-03, -6.03931171e-03,  6.62016198e-03,  1.40313942e-02,
                      0.00000000e+00,  5.00667052e-03, -7.14379427e-03,  1.82427877e-02,
                      0.00000000e+00,  7.00382489e-03,  0.00000000e+00,  0.00000000e+00,
                      0.00000000e+00,  0.00000000e+00,  0.00000000e+00,  1.27101740e-02,
                      1.04664614e-03, -9.52725613e-03,  0.00000000e+00,  0.00000000e+00,
                     -2.00719867e-02, -9.96009439e-03, -8.08878112e-03, -4.88963686e-03,
                      0.00000000e+00,  0.00000000e+00,  0.00000000e+00,  3.52354994e-03,
                      0.00000000e+00,  0.00000000e+00,  1.43425315e-02, -1.91304985e-03,
                      0.00000000e+00, -8.16783457e-03,  0.00000000e+00, -7.90972297e-03,
                      0.00000000e+00,  0.00000000e+00, -3.91039687e-03, -9.50454431e-03,
                      0.00000000e+00,  0.00000000e+00,  0.00000000e+00,  0.00000000e+00,
                      0.00000000e+00,  0.00000000e+00,  1.35019165e-02, -3.79187488e-03,
                      0.00000000e+00,  0.00000000e+00, -2.00539933e-02,  0.00000000e+00,
                     -9.47561570e-03,  6.36504792e-04,  0.00000000e+00, -5.26895062e-03,
                      0.00000000e+00,  0.00000000e+00, -5.40412735e-03,  0.00000000e+00,
                      0.00000000e+00,  0.00000000e+00,  5.24618011e-03,  5.13972498e-03,
                      1.02492474e-02,  0.00000000e+00,  7.70928376e-03,  0.00000000e+00,
                      0.00000000e+00, -3.86676002e-03,  2.10325178e-02,  0.00000000e+00,
                      1.09914753e-03,  0.00000000e+00, -7.70850877e-03,  0.00000000e+00,
                     -5.87465732e-03,  7.96870452e-03, -1.11797218e-02, -1.80003682e-03,
                      7.26820131e-03,  0.00000000e+00, -1.21888192e-02, -1.12437091e-02,
                      0.00000000e+00,  0.00000000e+00,  0.00000000e+00,  0.00000000e+00,
                     -1.66393617e-02, -1.26427918e-03,  0.00000000e+00,  3.41353809e-04,
                      7.65315423e-03,  0.00000000e+00,  2.23011389e-02,  0.00000000e+00,
                      0.00000000e+00,  0.00000000e+00,  6.28689397e-03,  0.00000000e+00,
                      3.80296555e-03,  2.93258248e-03, -8.63148436e-03,  1.00621692e-02,
                     -1.30036846e-02,  0.00000000e+00, -1.17436526e-02, -6.86236701e-03,
                      0.00000000e+00,  0.00000000e+00, -1.31072146e-02, -7.02233910e-03,
                     -1.09039601e-02,  8.74511404e-03, -6.51182845e-03,  0.00000000e+00,
                      1.13274234e-02,  0.00000000e+00,  0.00000000e+00,  0.00000000e+00,
                      6.40680790e-03,  0.00000000e+00,  0.00000000e+00,  4.80586297e-04,
                     -5.83379995e-03, -1.85624197e-02,  5.86391182e-03,  0.00000000e+00,
                      4.68465128e-04,  0.00000000e+00,  0.00000000e+00,  2.05088168e-02,
                      9.90026344e-03,  0.00000000e+00,  0.00000000e+00,  0.00000000e+00,
                      1.89780027e-02, -3.08836288e-03,  1.04654648e-02,  0.00000000e+00,
                      0.00000000e+00,  0.00000000e+00, -1.70380367e-02,  0.00000000e+00,
                      0.00000000e+00,  9.39745661e-03,  0.00000000e+00,  0.00000000e+00,
                      0.00000000e+00, -7.74312744e-03,  5.85546781e-03,  0.00000000e+00,
                      0.00000000e+00,  0.00000000e+00,  1.58612556e-02,  0.00000000e+00,
                      0.00000000e+00, -3.99866501e-03,  0.00000000e+00,  0.00000000e+00,
                      1.46049803e-02,  7.53740910e-03,  8.84645762e-04,  1.58088702e-02,
                     -1.43920470e-02,  0.00000000e+00,  1.02976509e-02,  1.11472720e-02,
                      0.00000000e+00,  0.00000000e+00,  0.00000000e+00,  0.00000000e+00])),
             ('Probabilities1.W',
              array([[ 0.00924904,  0.04357116,  0.06890452, ...,  0.05960178,
                       0.0068972 , -0.11916905],
                     [ 0.23126429, -0.01205161, -0.06317142, ...,  0.03436202,
                      -0.0837746 ,  0.0399785 ],
                     [-0.03191531,  0.06218873,  0.00520463, ..., -0.0138726 ,
                      -0.0694522 , -0.02506317],
                     ...,
                     [ 0.11550306,  0.07997372,  0.09754261, ..., -0.0632434 ,
                       0.0910609 ,  0.02819328],
                     [-0.02586889,  0.0998327 ,  0.03985503, ...,  0.08392605,
                       0.1319304 , -0.03700615],
                     [-0.09042405, -0.03378866,  0.10019364, ..., -0.04561189,
                      -0.01316771, -0.05808974]])),
             ('Probabilities1.W.momentum',
              array([[ 0.        ,  0.        ,  0.        , ...,  0.        ,
                       0.        ,  0.        ],
                     [ 0.        ,  0.        ,  0.        , ...,  0.        ,
                       0.        ,  0.        ],
                     [ 0.00571342, -0.04879519,  0.00884413, ...,  0.00338936,
                       0.00615124,  0.00151468],
                     ...,
                     [ 0.        ,  0.        ,  0.        , ...,  0.        ,
                       0.        ,  0.        ],
                     [ 0.        ,  0.        ,  0.        , ...,  0.        ,
                       0.        ,  0.        ],
                     [ 0.        ,  0.        ,  0.        , ...,  0.        ,
                       0.        ,  0.        ]])),
             ('Hidden1.W',
              array([[-0.09203534, -0.0306802 , -0.00599801, ...,  0.03658268,
                      -0.05734369, -0.01589865],
                     [ 0.04604353, -0.04142277, -0.00041159, ..., -0.04508508,
                       0.0389231 , -0.00032717],
                     [-0.01911034, -0.06623062, -0.01788632, ..., -0.06593067,
                      -0.02994138,  0.00297791],
                     ...,
                     [-0.00654239,  0.06390151, -0.04427453, ..., -0.01994633,
                       0.01366618, -0.00764931],
                     [ 0.0333654 , -0.00048473, -0.09249187, ..., -0.02849318,
                      -0.03834503,  0.00128915],
                     [-0.00230408, -0.03888115, -0.04023373, ..., -0.06812444,
                       0.11394296, -0.02966588]])),
             ('Hidden1.W.momentum',
              array([[-6.86189404e-05, -6.86189404e-05, -9.14168985e-03, ...,
                       6.86189404e-05, -6.86189404e-05, -6.86189404e-05],
                     [ 6.86189404e-05, -6.86189404e-05, -9.14168985e-03, ...,
                      -6.86189404e-05,  6.86189404e-05, -6.86189404e-05],
                     [-6.86189404e-05, -6.86189404e-05, -9.14168985e-03, ...,
                      -6.86189404e-05, -6.86189404e-05,  6.86189404e-05],
                     ...,
                     [-6.86189404e-05,  6.86189404e-05, -9.14168985e-03, ...,
                      -6.86189404e-05,  6.86189404e-05, -6.86189404e-05],
                     [ 6.86189404e-05, -6.86189404e-05, -9.14168985e-03, ...,
                      -6.86189404e-05, -6.86189404e-05,  6.86189404e-05],
                     [-6.86189404e-05, -6.86189404e-05, -9.14168985e-03, ...,
                      -6.86189404e-05,  6.86189404e-05, -6.86189404e-05]])),
             ('Probabilities1.b',
              array([-0.0022705 ,  0.01915674, -0.00327358, -0.00519217, -0.00133102,
                     -0.000805  , -0.00198406, -0.00127828, -0.00249152, -0.0005306 ])),
             ('Probabilities1.b.momentum',
              array([ 0.01526163, -0.12944637,  0.0227595 ,  0.03423116,  0.00902683,
                      0.00568669,  0.01329741,  0.0088057 ,  0.01659171,  0.00378574]))])