Dropout¶
- class
dragon.vm.tensorflow.keras.layers.
Dropout
(
rate,
**kwargs
)[source]¶ Layer to apply the dropout function. [Srivastava et.al, 2014].
The Dropout function is defined as:
\[\text{Dropout}(x) = x * (r \sim \mathcal{B}(1, 1 - \text{rate})) \]Examples:
m = tf.keras.layers.Dropout(0.5) print(m(tf.ones((2, 3), 'float32')))
__init__¶
Dropout.
__init__
(
rate,
**kwargs
)[source]¶Create a
Dropout
layer.- Parameters:
- rate (Union[float, dragon.Tensor]) – The dropping ratio.