Ejemplo n.º 1
0
def dropout(x, keep_prob, name=None):
    """
    Computes dropout.

      With probability `keep_prob`, outputs the input element scaled up by
      `1 / keep_prob`, otherwise outputs `0`.  The scaling is so that the expected
      sum is unchanged.

      Args:
        x: A tensor.
        keep_prob: A float. The probability that each element is kept.
        name: A name for this operation (optional).

      Returns:
        A Tensor of the same shape of `x`.
    """

    return ops.Dropout(x, 1 - keep_prob)
Ejemplo n.º 2
0
 def Setup(self, bottom):
     super(DropoutLayer, self).Setup(bottom)
     input = bottom[0] if isinstance(bottom, list) else bottom
     return ops.Dropout(input, **self._param)
Ejemplo n.º 3
0
def dropout(x, keep_prob, name=None):
    return ops.Dropout(x, 1 - keep_prob)
Ejemplo n.º 4
0
def dropout(x, keep_prob, name=None):
    return _ops.Dropout(x, 1. - keep_prob, name=name)
Ejemplo n.º 5
0
 def LayerSetup(self, bottom):
     return _ops.Dropout(bottom, **self.arguments)