dropout

dragon.vm.tensorflow.nn.dropout(
  x,
  rate,
  name=None,
  **kwargs
)[source]

Set the elements of the 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 dropping probability.
  • name (str, optional) – A optional name for the operation.
Returns:

dragon.Tensor – The output tensor.