sub

static OperationNamespace.sub(x, y, *, name=None)

Subtracts one value from another element-wise.

Parameters
  • x (number or np.ndarray or Tensor) – The value from which to subtract, \(x\).

  • y (number or np.ndarray or Tensor) – The value to subtract, \(y\).

  • name (str, optional) – The name of the node.

Returns

The element-wise value of \(x-y\).

Return type

Tensor