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

前端 未结 1 1092
情话喂你
情话喂你 2021-01-27 04:43

From nick blog it is clear that in dropout layer of CNN model we drop some nodes on the basis of bernoulli. But how to verify it, i.e. how to check which node is not selected. I

相关标签:
1条回答
  • 2021-01-27 05:23

    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.

    0 讨论(0)
提交回复
热议问题