コード例 #1
0
def tanh(x, name=None):
    """
    Computes hyperbolic tangent of `x` element-wise.

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

     Returns:
       A Tensor with the same type.

    """

    return ops.Tanh(x, name=name)
コード例 #2
0
ファイル: nnet.py プロジェクト: awesome-archive/Dragon
def tanh(x):
    """TanH function.

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

    Returns
    -------
    Tensor
        The output tensor.

    """
    return ops.Tanh(x)
コード例 #3
0
ファイル: math_ops.py プロジェクト: zhangkaij/Dragon
def tanh(x, name=None):

    return ops.Tanh(x, name=name)
コード例 #4
0
 def Setup(self, bottom):
     super(TanHLayer, self).Setup(bottom)
     input = bottom[0] if isinstance(bottom, list) else bottom
     return ops.Tanh(input, **self._param)
コード例 #5
0
def tanh(x, **kwargs):
    return ops.Tanh(x, **kwargs)
コード例 #6
0
ファイル: neuron.py プロジェクト: yyaqi/Dragon
 def LayerSetup(self, bottom):
     return _ops.Tanh(bottom, **self.arguments)