dropout¶
dragon.vm.tensorflow.nn.
dropout
(
x,
rate,
name=None,
**kwargs
)[source]¶Set the elements of input to zero randomly. [Srivastava et.al, 2014].
The Dropout function is defined as:
\[\text{Dropout}(x) = x * \text{Bernoulli}(p=1 - prob) \]Examples:
x = tf.ones((2, 3), 'float32') print(tf.nn.dropout(x, 0.5))
- Parameters:
- x (dragon.Tensor) – The tensor \(x\).
- rate (Union[float, dragon.Tensor]) – The probability to zero an element.
- name (str, optional) – The operation name.
- Returns:
dragon.Tensor – The output tensor.