Example #1
0
def pow(a):
    """Calculate the power of input.

    Parameters
    ----------
    a : Tensor
        The input tensor.

    Returns
    -------
    Tensor
        The sqrt result.

    """
    return ops.Pow(a)
Example #2
0
def pow(x, power, name=None):
    """
    Computes pow of x element-wise.

      I.e., \\(y = \pow{x} = x^{power}\\).

      Args:
        x: A `Tensor`.
        name: A name for the operation (optional).

      Returns:
        A `Tensor`. Has the same type as `x`.

    """

    return ops.Pow(x, power=power, name=name)
Example #3
0
def sqrt(x, name=None):
    """
    Computes square root of x element-wise.

      I.e., \\(y = \sqrt{x} = x^{1/2}\\).

      Args:
        x: A `Tensor`.
        name: A name for the operation (optional).

      Returns:
        A `Tensor`. Has the same type as `x`.

    """

    return ops.Pow(x, power=0.5, name=name)
Example #4
0
def pow(x, power, name=None):

    return ops.Pow(x, power=power, name=name)
Example #5
0
def sqrt(x, name=None):

    return ops.Pow(x, power=0.5, name=name)
Example #6
0
 def Setup(self, bottom):
     super(PowerLayer, self).Setup(bottom)
     input = bottom[0] if isinstance(bottom, list) else bottom
     return ops.Pow(input, **self._param)
Example #7
0
 def LayerSetup(self, bottom):
     return _ops.Pow(bottom, **self.arguments)