我想在训练时从Sequential Keras模型中的dropout层提取并存储1/0的dropout掩码数组。我想知道在Keras中是否有一种直接的方法来做到这一点,或者我是否需要切换到tensorflow (How to get the dropout mask in Tensorflow)。我对TensorFlow和Keras还很陌生。dropout层有几个函数(dropou
我正在将代码从tensorflow 1.x迁移到tensorflow-2.0。我使用了tensorflow-2.0提供的转换脚本,它很好。但是,脚本不能转换tf.contrib模块的代码。def dropout(input_tensor, dropout_prob): A version of `input_tensor` with dropout
.# GRADED FUNCTION: conv_block max_pooling -- Use MaxPooling2D to reduce the spatial dimensions of the> 0 add a dropout layer, with the variable dropout_prob as