-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTestScript.py
More file actions
27 lines (23 loc) · 850 Bytes
/
TestScript.py
File metadata and controls
27 lines (23 loc) · 850 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
26
27
import mnist_loader
import NN_core
import time
t0 = time.time()
"""
In this file, the learning algorithm is trained with the MNIST dataset, the examples are
loaded using the structure raised by Michael Nielsen, the input array has 50.000 examples
each one with 784 inputs and 10 outputs
"""
# Splitting the data into training, validation and testing. Using the mnist_loader
training_data, validation_data, test_data = mnist_loader.load_data_wrapper()
training_data = list(training_data)
validation_data = list(validation_data)
test_data = list(test_data)
print(len(training_data))
print(len(validation_data))
print(len(test_data))
print(len(training_data) + len(validation_data) + len(test_data))
# net = NN_core.Network([784, 30, 30, 10])
# net.sgd(training_data, 10, 10, 3.0, test_data=test_data)
# t1 = time.time()
# to = t1 - t0
# print(to)