3.23. Making MoviesΒΆ
[1]:
import conx as cx
Using Theano backend.
ConX, version 3.6.0
[2]:
net = cx.Network("Same", 2, 5, 1, activation="sigmoid")
net.compile(error="mse", optimizer="adam")
[7]:
net.picture()
[7]:
[3]:
net.dataset.load([
[[0, 0], [1]],
[[0, 1], [0]],
[[1, 0], [0]],
[[1, 1], [1]],
])
[4]:
net.plot_activation_map(format="image")
[4]:
[5]:
if net.saved():
net.load()
net.plot_results()
else:
net.train(2000, accuracy=1.0, tolerance=.2, record=True, report_rate=25, plot=True)
net.save()
========================================================
| Training | Training
Epochs | Error | Accuracy
------ | --------- | ---------
# 2000 | 0.08333 | 0.00000
[6]:
net.movie(lambda net, epoch: net.plot_activation_map(title="Epoch %s" % epoch,
format="image"),
step=200, duration=500)
[6]:
[ ]: