operator (-) Interface

public interface operator (-)

Module Procedures

public function torch_tensor_negative(tensor) result(output)

Overloads negative operator for a single tensor.

Arguments

Type IntentOptional Attributes Name
type(torch_tensor), intent(in) :: tensor

Tensor to take the negative of

Return Value type(torch_tensor)

Tensor to hold the negative values

public function torch_tensor_subtract(tensor1, tensor2) result(output)

Overloads subtraction operator for two tensors.

Arguments

Type IntentOptional Attributes Name
type(torch_tensor), intent(in) :: tensor1

First tensor for the subtraction

type(torch_tensor), intent(in) :: tensor2

Second tensor for the subtraction

Return Value type(torch_tensor)

Tensor to hold the difference