Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class_weights = {0: 1.4, 1: 1, 2: 2.3, 3: 2.3}
- # sets up the model shape
- model = Sequential()
- model.add(Conv2D(32, (3, 3), activation='relu', input_shape=input_shape))
- model.add(MaxPooling2D(pool_size=(2, 2)))
- model.add(Conv2D(64, (3, 3), activation='relu'))
- model.add(MaxPooling2D(pool_size=(2, 2)))
- model.add(Flatten())
- model.add(Dense(64, activation='relu'))
- model.add(Dropout(0.05))
- model.add(Dense(64, activation='relu'))
- model.add(Dropout(0.05))
- model.add(Dense(n_classes, activation='softmax'))
- model.compile(loss='categorical_crossentropy',
- optimizer='Adam',
- metrics=['accuracy'])
- # sets up the call back so we can have the logs
- tbCallBack = TensorBoard(log_dir=log_pth.format(time()))
Add Comment
Please, Sign In to add comment