|
@@ -16,12 +16,13 @@ activationDerivative = lambda x : expit(x) * (1 - expit(x))
|
|
|
epochs = 1
|
|
|
|
|
|
# Session
|
|
|
-newNetwork = generator.generate(activation, activationDerivative, generator.gaussUnitDev)
|
|
|
+network = generator.generate(activation, activationDerivative, generator.gaussUnitDev)
|
|
|
|
|
|
-trainedNetwork = trainer.train(newNetwork, learnRate, epochs)
|
|
|
+precisionBefore = benchmark.computePrecision(network)
|
|
|
|
|
|
-precisionBefore = benchmark.computePrecision(newNetwork)
|
|
|
-precisionAfter = benchmark.computePrecision(trainedNetwork)
|
|
|
+network = trainer.train(network, learnRate, epochs)
|
|
|
+
|
|
|
+precisionAfter = benchmark.computePrecision(network)
|
|
|
|
|
|
# Display results
|
|
|
print("Precision before training : ", precisionBefore)
|