In [1]:
%matplotlib inline 
import matplotlib.pyplot as plt
import numpy as np
import sys
sys.path.append('./CloudStation/pc-ule-Sync/CurrentResearch/PyCharmProjects/AMORE')
from amore.interface import *
from amore.viewers import MlpNeuralViewer

In [2]:


In [2]:
data = np.random.rand(1000, 1)
target = data ** 2
plt.scatter(data, target)


Out[2]:
<matplotlib.collections.PathCollection at 0x7fb905042080>

In [3]:
net = mlp_network([1, 5, 1], 'tanh', 'identity')
MlpNeuralViewer.show_neural_network(net)


----------------------------------------------
Simple Neural Network
----------------------------------------------
     INPUT LAYER:
----------------------------------------------
[<amore.materials.MlpNeuron object at 0x7fb9206a6400>]
----------------------------------------------
     HIDDEN LAYERS:
----------------------------------------------
[[<amore.materials.MlpNeuron object at 0x7fb9206a6470>, <amore.materials.MlpNeuron object at 0x7fb9206a63c8>, <amore.materials.MlpNeuron object at 0x7fb9206a62e8>, <amore.materials.MlpNeuron object at 0x7fb9206a6208>, <amore.materials.MlpNeuron object at 0x7fb9206a6080>]]
----------------------------------------------
     OUTPUT LAYER:
----------------------------------------------
[<amore.materials.MlpNeuron object at 0x7fb904ff2ac8>]

In [4]:
fit_adaptive_gradient_descent(net, data, target, 0.1, 100, 5)


Step=0
Step=1
Step=2
Step=3
Step=4
Out[4]:
<amore.materials.MlpNeuralNetwork at 0x7fb90505d860>

In [7]:
plt.scatter(data, net(data))


Out[7]:
<matplotlib.collections.PathCollection at 0x7fb904f25390>

In [6]:
9


Out[6]:
9

In [7]:


In [7]:


In [7]:


In [1]:


In [1]:


In [ ]: