plus-.torch.Tensor: Add two tensors

Description Usage Arguments Value Examples

Description

This generic is similar to applying torch$add(a, b)

Usage

1
2
## S3 method for class 'torch.Tensor'
a + b

Arguments

a

tensor

b

tensor

Value

Another tensor representing the addition of two tensors.

Examples

1
2
3
4
5
6
7
## Not run: 
a <- torch$Tensor(list(1, 1, 1))
b <- torch$Tensor(list(2, 2, 2))
s <- 2.0
a + b

## End(Not run)

rTorch documentation built on Jan. 13, 2021, 4:32 p.m.