Guest User

Untitled

a guest
Jan 16th, 2019
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.12 KB | None | 0 0
  1. import keras
  2. from keras.layers import Conv3D, MaxPooling3D, Conv3DTranspose, Input
  3. from keras.models import Model
  4.  
  5. def FCN3DNet():
  6.  
  7. inputLayerA = Input(shape=(96,96,96,1))
  8. inputLayerB = Input(shape=(96,96,96,1))
  9.  
  10. totalInput = keras.layers.concatenate([inputLayerA, inputLayerB])
  11.  
  12. x = Conv3D(16, (2,2,2), padding='same', data_format='channels_last', activation='relu')(totalInput)
  13.  
  14. x = MaxPooling3D(pool_size=(2,2,2))(x)
  15.  
  16. x = Conv3D(32, (2,2,2), padding='same', activation='relu')(x)
  17.  
  18. x = MaxPooling3D(pool_size=(2,2,2))(x)
  19.  
  20. x = Conv3D(64, (2,2,2), padding='same', activation='relu')(x)
  21.  
  22. x = MaxPooling3D(pool_size=(2,2,2))(x)
  23.  
  24. x = Conv3DTranspose(32, (2,2,2), strides=(2,2,2), padding='same', activation='relu')(x)
  25.  
  26. x = Conv3DTranspose(16, (2,2,2), strides=(2,2,2), padding='same', activation='relu')(x)
  27.  
  28. x = Conv3DTranspose(3, (2,2,2), strides=(2,2,2), padding='same', activation='linear')(x)
  29.  
  30. model = Model(inputs=[inputLayerA, inputLayerB], outputs=x)
  31. return model
  32.  
  33.  
  34. model = FCN3DNet()
  35.  
  36.  
  37. print(model.summary())
  38. ## The shapes reported in this summary have the number of channels truncated
Add Comment
Please, Sign In to add comment