diff --git a/testBp.py b/testBp.py new file mode 100644 index 0000000..4a9dddd --- /dev/null +++ b/testBp.py @@ -0,0 +1,45 @@ +""" + Testing code for different neural network configurations. + Adapted for Python 3.5.2 + + Usage in shell: + python3.5 test.py + + Network (network.py and network2.py) parameters: + 2nd param is epochs count + 3rd param is batch size + 4th param is learning rate (eta) + + Author: + Michał Dobrzański, 2016 + dobrzanski.michal.daniel@gmail.com +""" + +# ---------------------- +# - read the input data: + +import mnist_loader +training_data, validation_data, test_data = mnist_loader.load_data_wrapper() +training_data = list(training_data) + +# --------------------- +# - network.py example: +import network + + +net = network.Network([784, 30, 10]) +net.SGD(training_data, 30, 10, 3.0, test_data=test_data) + + +# ---------------------- +# - network2.py example: +#import network2 + +''' +net = network2.Network([784, 30, 10], cost=network2.CrossEntropyCost) +#net.large_weight_initializer() +net.SGD(training_data, 30, 10, 0.1, lmbda = 5.0,evaluation_data=validation_data, + monitor_evaluation_accuracy=True) +''' + +#