Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def basic_cnn():
- model = Sequential()
- model.add(Conv2D(4, kernel_size=(5, 5), strides=(1, 1), activation='relu'))
- model.add(MaxPooling2D(pool_size=(2, 2), strides=(2, 2)))
- model.add(Conv2D(8, kernel_size=(5, 5), activation='relu'))
- model.add(MaxPooling2D(pool_size=(2, 2)))
- model.add(Flatten())
- model.add(Dense(NUM_CLASSES, activation='softmax'))
- # sgd = SGD(lr=0.000001) # unused
- model.compile(loss='binary_crossentropy', optimizer='adam', metrics=['accuracy'])
- return model
Advertisement
Add Comment
Please, Sign In to add comment