SHARE
TWEET

Untitled

a guest Jun 15th, 2019 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. model = Sequential()
  2. model.add(ZeroPadding2D((1,1),input_shape=(224,224, 3)))
  3. model.add(Convolution2D(64, (3, 3), activation='relu'))
  4. model.add(ZeroPadding2D((1,1)))
  5. model.add(Convolution2D(64, (3, 3), activation='relu'))
  6. model.add(MaxPooling2D((2,2), strides=(2,2)))
  7.  
  8. model.add(ZeroPadding2D((1,1)))
  9. model.add(Convolution2D(128, (3, 3), activation='relu'))
  10. model.add(ZeroPadding2D((1,1)))
  11. model.add(Convolution2D(128, (3, 3), activation='relu'))
  12. model.add(MaxPooling2D((2,2), strides=(2,2)))
  13.  
  14. model.add(ZeroPadding2D((1,1)))
  15. model.add(Convolution2D(256, (3, 3), activation='relu'))
  16. model.add(ZeroPadding2D((1,1)))
  17. model.add(Convolution2D(256, (3, 3), activation='relu'))
  18. model.add(ZeroPadding2D((1,1)))
  19. model.add(Convolution2D(256, (3, 3), activation='relu'))
  20. model.add(MaxPooling2D((2,2), strides=(2,2)))
  21.  
  22. model.add(ZeroPadding2D((1,1)))
  23. model.add(Convolution2D(512, (3, 3), activation='relu'))
  24. model.add(ZeroPadding2D((1,1)))
  25. model.add(Convolution2D(512, (3, 3), activation='relu'))
  26. model.add(ZeroPadding2D((1,1)))
  27. model.add(Convolution2D(512, (3, 3), activation='relu'))
  28. model.add(MaxPooling2D((2,2), strides=(2,2)))
  29.  
  30. model.add(ZeroPadding2D((1,1)))
  31. model.add(Convolution2D(512, (3, 3), activation='relu'))
  32. model.add(ZeroPadding2D((1,1)))
  33. model.add(Convolution2D(512, (3, 3), activation='relu'))
  34. model.add(ZeroPadding2D((1,1)))
  35. model.add(Convolution2D(512, (3, 3), activation='relu'))
  36. model.add(MaxPooling2D((2,2), strides=(2,2)))
  37.  
  38. model.add(Convolution2D(4096, (7, 7), activation='relu'))
  39. model.add(Dropout(0.5))
  40. model.add(Convolution2D(4096, (1, 1), activation='relu'))
  41. model.add(Dropout(0.5))
  42. model.add(Convolution2D(2622, (1, 1)))
  43. model.add(Flatten())
  44. model.add(Activation('softmax'))
  45.  
  46. from keras.models import model_from_json
  47. model.load_weights('vgg_face_weights.h5')
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