how to apply MC dropout to an LSTM network keras
I have a simple LSTM network developped using keras:
model = Sequential()
model.add(LSTM(rnn_size,input_shape=(2,w),dropout = 0.25 , recurrent_dropout=0.25))
model.add(Dense(2))
I would like to apply the MC dropout method. How can I enable dropout in the test phase in order to compute the uncertainty?
Thanks.
Topic lstm dropout rnn deep-learning
Category Data Science