how to know which node is dropped after using keras dropout layer

我与影子孤独终老i 提交于 2019-12-02 07:24:21

Concerning your second question, if you see Keras code, in the call method form Dropout class:

def call(self, inputs, training=None):
    if 0. < self.rate < 1.:
        noise_shape = self._get_noise_shape(inputs)

        def dropped_inputs():
            return K.dropout(inputs, self.rate, noise_shape,
                             seed=self.seed)
        return K.in_train_phase(dropped_inputs, inputs,
                                training=training)
    return inputs

This means that if the rate is not between 0 and 1, it will do nothing.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!