Beispiel #1
0
def div_(self, value):
    """Inplace of ``Tensor.div()``

    Parameters
    ----------
    value : vm.torch.Tensor, int or float
        The value tensor.

    Returns
    -------
    vm.torch.Tensor
        The self.

    """
    return _fundamental(self, value, out=self, op='Div')
Beispiel #2
0
def div(self, value):
    """Divide the ``self`` and ``value`` into the output tensor.

    Parameters
    ----------
    value : vm.torch.Tensor, int or float
        The value tensor.

    Returns
    -------
    vm.torch.Tensor
        The output tensor.

    """
    return _fundamental(self, value, op='Div')
Beispiel #3
0
def mul(self, value):
    """Multiply the ``self`` and ``value`` into the output tensor.

    Parameters
    ----------
    value : vm.torch.Tensor, int or float
        The value tensor.

    Returns
    -------
    vm.torch.Tensor
        The output tensor.

    """
    return _fundamental(self, value, op='Mul')
Beispiel #4
0
def sub(self, value):
    """Subtract the ``self`` and ``value`` into the output tensor.

    Parameters
    ----------
    value : vm.torch.Tensor, int or float
        The value tensor.

    Returns
    -------
    vm.torch.Tensor
        The output tensor.

    """
    return _fundamental(self, value, op='Sub')
Beispiel #5
0
def add_(self, value):
    """Inplace of ``torch.add()``

    Parameters
    ----------
    value : vm.torch.Tensor, int or float
        The value tensor.

    Returns
    -------
    vm.torch.Tensor
        The self.

    """
    return _fundamental(self, value, out=self, op='Add')
Beispiel #6
0
def add(self, value):
    """See ``torch.add()``

    Parameters
    ----------
    value : vm.torch.Tensor, int or float
        The value tensor.

    Returns
    -------
    vm.torch.Tensor
        The output tensor.

    """
    return _fundamental(self, value, op='Add')