Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import keras
- from keras.layers import Conv3D, MaxPooling3D, Conv3DTranspose, Input
- from keras.models import Model
- def FCN3DNet():
- inputLayerA = Input(shape=(96,96,96,1))
- inputLayerB = Input(shape=(96,96,96,1))
- totalInput = keras.layers.concatenate([inputLayerA, inputLayerB])
- x = Conv3D(16, (2,2,2), padding='same', data_format='channels_last', activation='relu')(totalInput)
- x = MaxPooling3D(pool_size=(2,2,2))(x)
- x = Conv3D(32, (2,2,2), padding='same', activation='relu')(x)
- x = MaxPooling3D(pool_size=(2,2,2))(x)
- x = Conv3D(64, (2,2,2), padding='same', activation='relu')(x)
- x = MaxPooling3D(pool_size=(2,2,2))(x)
- x = Conv3DTranspose(32, (2,2,2), strides=(2,2,2), padding='same', activation='relu')(x)
- x = Conv3DTranspose(16, (2,2,2), strides=(2,2,2), padding='same', activation='relu')(x)
- x = Conv3DTranspose(3, (2,2,2), strides=(2,2,2), padding='same', activation='linear')(x)
- model = Model(inputs=[inputLayerA, inputLayerB], outputs=x)
- return model
- model = FCN3DNet()
- print(model.summary())
- ## The shapes reported in this summary have the number of channels truncated
Add Comment
Please, Sign In to add comment