fork download
  1. def custom_model():
  2. from keras.models import Sequential
  3. from keras.layers import Conv2D, MaxPooling2D, Flatten, Dense
  4.  
  5. model = Sequential()
  6. model.add(Conv2D(32, (3, 3), activation='relu', input_shape=(32, 32, 3)))
  7. model.add(MaxPooling2D((2, 2)))
  8. model.add(Conv2D(64, (3, 3), activation='relu'))
  9. model.add(MaxPooling2D((2, 2)))
  10. model.add(Flatten())
  11. model.add(Dense(10, activation='softmax'))
  12. return model
  13.  
  14. print(custom_model())
Success #stdin #stdout 2.64s 317020KB
stdin
Standard input is empty
stdout
<keras.engine.sequential.Sequential object at 0x14789a147400>