SHARE
TWEET

Untitled

a guest Jun 20th, 2019 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. model = Sequential()
  2. model.add(Conv2D(24,kernel_size=3,padding='same',activation='relu',
  3.         input_shape=(96,96,1)))
  4. model.add(MaxPool2D())
  5. model.add(Conv2D(48,kernel_size=3,padding='same',activation='relu'))
  6. model.add(MaxPool2D())
  7. model.add(Conv2D(64,kernel_size=3,padding='same',activation='relu'))
  8. model.add(MaxPool2D(padding='same'))
  9. model.add(Conv2D(96,kernel_size=3,padding='same',activation='relu'))
  10. model.add(MaxPool2D(padding='same'))
  11. model.add(Flatten())
  12. model.add(Dense(128, activation='relu'))
  13. model.add(Dropout(0.5))
  14. model.add(Dense(256, activation='relu'))
  15. model.add(Dropout(0.5))
  16. model.add(Dense(16, activation='softmax'))
  17. model.compile(optimizer="adam", loss="categorical_crossentropy",metrics=["accuracy"])  
  18.  
  19. #image generation
  20. image_gen.fit(train_X)
  21. train = model.fit_generator(image_gen.flow(train_X, train_label, batch_size=15),epochs=100,verbose=1,validation_data=(valid_X, valid_label),class_weight=class_weights,callbacks=[metrics],steps_per_epoch=len(train_X)/15)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top