-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMain.py
26 lines (21 loc) · 1.26 KB
/
Main.py
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
#
# @name: Morgan Van Valkenburgh
# @date: May 20th 2020
# @brief:
#
import DataLoader
import NeuralNetwork
training_data, validation_data, test_data = DataLoader.load_data_wrapper()
training_data = list(training_data)
# Notes to remember how to access data
#print(len(training_data)) # Prints how many training entries there are
#print(len(training_data[0][0])) # Prints number of input neurons
#print(len(training_data[0][1])) # Prints number of output neurons
#print(len(training_data[1][1]))
neuronsIL = len(training_data[0][0]) # Setting the number of neurons in the Input Layer from the data
neuronsHL = 16 # Setting the number of neurons in the Hidden Layer (Arbitrary Choice)
neuronsOL = len(training_data[0][1]) # Setting the number of neurons in the Output Layer from the data
numberHL = 2 # Setting the number of Hidden Layers (Arbitrary Choice)
net = NeuralNetwork.Network([neuronsIL, neuronsHL, neuronsOL, numberHL]) # Initializing the network
net.print_info() # Printing information about the network
net.test_function(training_data) # Going through examples one by one, printing the untrained result