rezazad68 / BCDU-Net

BCDU-Net : Medical Image Segmentation
719 stars 265 forks source link

Bidirectional ConvLSTM #12

Closed mingyue333 closed 4 years ago

mingyue333 commented 4 years ago

Thank you for your sharing, and i still confused about the differences between the two coding scheme of bi-directional ConvLSTM . One is what you discribed before:

LSTM_f = layers.ConvLSTM2D(filters = 128, kernel_size=(3, 3), padding='same', return_sequences = False, go_backwards = False, kernel_initializer = 'he_normal')(X)

LSTM_b = layers.ConvLSTM2D(filters = 128, kernel_size=(3, 3), padding='same', return_sequences = False, go_backwards = True, kernel_initializer = 'he_normal')(X)

Bi_rep = layers.Add()([LSTM_f, LSTM_b])

The other is using the Bidirectional wrapper:

Bidirectional(ConvLSTM2D(filters = 128, kernel_size=(3, 3), padding='same', kernel_initializer='he_normal', return_sequences=True))(X)''.

Could you tell if the second statement is correct, and if there are some differences between them? Than you for your reply!

rezazad68 commented 4 years ago

It is almost same but I am not sure bidirectional works with ConvLSTM2D or not. Generally for combining two stream you can use average, sum or concatenation or any defined operation.