Bananaware

code

Jul 10th, 2020
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. def basic_cnn():
  2. model = Sequential()
  3. model.add(Conv2D(4, kernel_size=(5, 5), strides=(1, 1), activation='relu'))
  4. model.add(MaxPooling2D(pool_size=(2, 2), strides=(2, 2)))
  5. model.add(Conv2D(8, kernel_size=(5, 5), activation='relu'))
  6. model.add(MaxPooling2D(pool_size=(2, 2)))
  7. model.add(Flatten())
  8. model.add(Dense(NUM_CLASSES, activation='softmax'))
  9. # sgd = SGD(lr=0.000001) # unused
  10. model.compile(loss='binary_crossentropy', optimizer='adam', metrics=['accuracy'])
  11. return model
Advertisement
Add Comment
Please, Sign In to add comment