substraction

# S3 method for tensor
-(x, y)

Arguments

x

tensor object

y

tensor to substract

Examples

x <- tensor(c(1,2,3,4)) y <- tensor(2) x - y
#> tensor #> -1 #> 0 #> 1 #> 2 #> [ Variable[CPUFloatType]{4} ]
x - 1
#> tensor #> 0 #> 1 #> 2 #> 3 #> [ Variable[CPUFloatType]{4} ]