-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathtest.py
More file actions
25 lines (23 loc) · 715 Bytes
/
test.py
File metadata and controls
25 lines (23 loc) · 715 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
"""
Testing code for different neural network configurations.
Adapted for Python 3.5.2
Usage in shell:
python3.5 test.py
Network (network.py) parameters:
2nd param is epochs count
3rd param is batch size
4th param is learning rate (eta)
"""
# ----------------------
# - 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
save_model = "mnist.json"
net = network.Network([784, 30, 10])
net.SGD(training_data, 30, 10, 3.0, test_data=test_data)
net.save(save_model)
#net = network.load(save_model)