From 5cdc7b52e16f43266f40961ce22b1ed5a6a82484 Mon Sep 17 00:00:00 2001 From: eynard Date: Thu, 10 Mar 2022 15:09:20 +0100 Subject: [PATCH] rien --- sobek/network.py | 5 +++-- tests/flowerGardenData | Bin 8529 -> 84138 bytes tests/flowerGardenLearningVisualization.py | 4 ++-- tests/generateSobekFlowerGarden.py | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/sobek/network.py b/sobek/network.py index 8d02041..c5575cd 100755 --- a/sobek/network.py +++ b/sobek/network.py @@ -1,5 +1,6 @@ import random import numpy as np +import matplotlib import matplotlib.pyplot as plt import matplotlib.animation as animation import pickle @@ -93,7 +94,7 @@ class network: vizualisationFrame = np.empty((30, 30)) for x in range(30): for y in range(30): - vizualisationFrame[x][y] = self.process(np.array([float(x), float(y)])) + vizualisationFrame[x][y] = self.process(np.array([float(x)/30, float(y)/30])) vizualisationData.append([graph.imshow(vizualisationFrame, animated=True)]) inputBatches = [inputs[j:j+batchSize] for j in range(0, len(inputs), batchSize)] @@ -135,7 +136,7 @@ class network: print(self.accuracy(accuracyInputs, accuracyDesiredOutputs)) if (visualize): - ani = animation.ArtistAnimation(fig, vizualisationData, interval=100) + ani = animation.ArtistAnimation(fig, vizualisationData, interval=100, repeat_delay=1000) plt.show() def __Error(self, layer, neuron): diff --git a/tests/flowerGardenData b/tests/flowerGardenData index ac5a67be7cefcc7ff511760c10604debbc406c2d..d965c8789b35f7040d79790cda053f7bba93aa54 100755 GIT binary patch literal 84138 zcmeI5PmGo4b;gI(mYb-HMsm09mTtW1ri(^*;YFh&S*q8Gs>C6pQscPPUO3%!ft6Z9 z@*>xZcEKjIVKWjE5k}Rou9t@FYh1x;GOr!zZf5WbxUx3__cR`B#~c?_sx7Xesj+c z$3GvxJ>I)-&%SSbG(Pa^;a7k3{)g}F-~5$t{P?fOAOE}l+dn$I=WoVuz4g}L{rB^K zTmP|d=Kb*xKYsI1|MNdK|1FKSta|<*-`Ysem@~Tn_4T>GUHaMl z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