我想在训练时从Sequential Keras模型中的dropout层提取并存储1/0的dropout掩码数组。我想知道在Keras中是否有一种直接的方法来做到这一点,或者我是否需要切换到tensorflow (How to get the dropout mask in Tensorflow)。dropout层有几个函数(dropout_layer.get_output_mask(),dropout_layer.get_input_mask()),我试着使用它,但在调用上一层
我希望在LSTM层中使用dropout进行训练和测试。根据这篇文章: https://towardsdatascience.com/learning-note-dropout-in-recurrent-networks-part-2-f209222481f8model = Sequential()model.add(Dropout(rate=0.2, training
我正面临着这个错误 NameError: name 'Dropout_U' is not defined 通过创建LSTM模型 embed_dim = 128batch_size32
model.add(Embedding(2500, embed_dim,input_length = X.shape[1]))model.add(LSTM(lstm_out))
model.add(Dropout_U