-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathNeuralNetG.py
More file actions
26 lines (17 loc) · 767 Bytes
/
Copy pathNeuralNetG.py
File metadata and controls
26 lines (17 loc) · 767 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
from NeuralNet import NeuralNet
import keras
from keras.models import Sequential
from keras.layers import Dense, Dropout, Activation, Flatten, BatchNormalization
from keras.layers import Conv2D, MaxPooling2D
from keras import backend
class NeuralNetG(NeuralNet):
def beginTraining(self):
self.setTrainingParameters(500000, 1000, 16, 12)
def defineModel(self, inputShape : tuple, outputSize : int):
model = Sequential()
model.add(Dense(512, activation='tanh', input_shape=inputShape))
model.add(Dense(512, activation='tanh'))
model.add(Dense(512, activation='tanh'))
model.add(Dense(512, activation='tanh'))
model.add(Dense(outputSize, activation='linear'))
return model