Neg
Examples
if (torch_is_installed()) {
a = torch_randn(c(5))
a
torch_neg(a)
}
#> torch_tensor
#> 0.4370
#> -0.7866
#> -0.8994
#> -0.6373
#> 0.3690
#> [ CPUFloatType{5} ]
Neg
if (torch_is_installed()) {
a = torch_randn(c(5))
a
torch_neg(a)
}
#> torch_tensor
#> 0.4370
#> -0.7866
#> -0.8994
#> -0.6373
#> 0.3690
#> [ CPUFloatType{5} ]