Tensorex.Operator.subtract
You're seeing just the function
subtract
, go back to Tensorex.Operator module for more information.
Specs
subtract(Tensorex.t(), Tensorex.t()) :: Tensorex.t()
Subtracts a tensor from another.
iex> Tensorex.Operator.subtract(
...> Tensorex.from_list([[0, 1, 2], [3, -4, -5.5]]),
...> Tensorex.from_list([[3, -2, -2], [6, -8.1, 12 ]]))
%Tensorex{data: %{[0, 0] => -3, [0, 1] => 3 , [0, 2] => 4 ,
[1, 0] => -3, [1, 1] => 4.1, [1, 2] => -17.5}, shape: [2, 3]}
iex> Tensorex.Operator.subtract(
...> Tensorex.from_list([[0, 1, 2], [3, -4, -5.5]]),
...> Tensorex.from_list([[0.0, 1, 2], [6, -8.1, 12 ]]))
%Tensorex{data: %{[1, 0] => -3, [1, 1] => 4.1, [1, 2] => -17.5}, shape: [2, 3]}