Advertisement
Guest User

Untitled

a guest
Aug 22nd, 2019
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. input=Input(shape=(x_train.shape[1:]))
  2. encoded=Conv2D(16, (3, 3), activation='relu', padding='same')(input)
  3. encoded=MaxPooling2D((2, 2), padding='same')(encoded)
  4. encoded=Conv2D(8, (3, 3), activation='relu', padding='same')(encoded)
  5. encoded=MaxPooling2D((2, 2), padding='same')(encoded)
  6. encoded=Conv2D(8, (3, 3), strides=(2,2), activation='relu', padding='same')(encoded)
  7. encoded=Flatten()(encoded)
  8.  
  9. decoded=Reshape((4, 4, 8))(encoded)
  10. decoded=Conv2D(8, (3, 3), activation='relu', padding='same')(decoded)
  11. decoded=UpSampling2D((2, 2))(decoded)
  12. decoded=Conv2D(8, (3, 3), activation='relu', padding='same')(decoded)
  13. decoded=UpSampling2D((2, 2))(decoded)
  14. decoded=Conv2D(16, (3, 3), activation='relu')(decoded)
  15. decoded=UpSampling2D((2, 2))(decoded)
  16. decoded=Conv2D(1, (3, 3), activation='sigmoid', padding='same')(decoded)
  17.  
  18. autoencoder=Model(input,decoded)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement