Function add

  • Adds two tensors element-wise.

    Parameters

    • a: Tensor

      the first tensor to be added

    • b: number | Vector | Tensor

      the second tensor to be added

    Returns Tensor

    the sum of the tensors