daily pastebin goal
57%
SHARE
TWEET

Untitled

a guest May 17th, 2018 105 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class_weights = {0: 1.4, 1: 1, 2: 2.3, 3: 2.3}
  2.  
  3. # sets up the model shape
  4. model = Sequential()
  5. model.add(Conv2D(32, (3, 3), activation='relu', input_shape=input_shape))
  6. model.add(MaxPooling2D(pool_size=(2, 2)))
  7.  
  8. model.add(Conv2D(64, (3, 3), activation='relu'))
  9. model.add(MaxPooling2D(pool_size=(2, 2)))
  10.  
  11. model.add(Flatten())
  12. model.add(Dense(64, activation='relu'))
  13. model.add(Dropout(0.05))
  14.  
  15. model.add(Dense(64, activation='relu'))
  16. model.add(Dropout(0.05))
  17.  
  18. model.add(Dense(n_classes, activation='softmax'))
  19.  
  20. model.compile(loss='categorical_crossentropy',
  21.               optimizer='Adam',
  22.               metrics=['accuracy'])
  23.  
  24. # sets up the call back so we can have the logs
  25. tbCallBack = TensorBoard(log_dir=log_pth.format(time()))
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
 
Top