Advertisement
Guest User

Untitled

a guest
Aug 20th, 2017
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.84 KB | None | 0 0
  1. inp = Input(get_inception_conv_layers(conv_layer_name,input_size)[-1].output_shape[1:])
  2. x = BatchNormalization(axis=1)(inp)
  3.  
  4. x = Convolution2D(nr_filters,3,3, activation='relu', border_mode='same')(x)
  5. x = BatchNormalization(axis=1)(x)
  6. x = Dropout(0.5)(x)
  7. x = MaxPooling2D()(x)
  8.  
  9. x = Convolution2D(nr_filters,3,3, activation='relu', border_mode='same')(x)
  10. x = BatchNormalization(axis=1)(x)
  11. x = Dropout(0.5)(x)
  12. x = MaxPooling2D()(x)
  13.  
  14. x = Convolution2D(nr_filters,3,3, activation='relu', border_mode='same')(x)
  15. x = BatchNormalization(axis=1)(x)
  16. x = Dropout(0.5)(x)
  17. x = MaxPooling2D()(x)
  18.  
  19. x = Convolution2D(NR_CLASSES,3,3, border_mode='same')(x)
  20. x = Dropout(0.5)(x)
  21. x = GlobalAveragePooling2D()(x)
  22. output = Activation('softmax')(x)
  23.  
  24. model = Model(inp, output)
  25. model.compile(Adam(lr=0.001), loss='categorical_crossentropy', metrics=['accuracy'])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement