Neg
Examples
if (torch_is_installed()) {
a = torch_randn(c(5))
a
torch_neg(a)
}
#> torch_tensor
#> -0.8517
#> 1.8104
#> 1.3541
#> 0.6150
#> 1.2783
#> [ CPUFloatType{5} ]
Neg
if (torch_is_installed()) {
a = torch_randn(c(5))
a
torch_neg(a)
}
#> torch_tensor
#> -0.8517
#> 1.8104
#> 1.3541
#> 0.6150
#> 1.2783
#> [ CPUFloatType{5} ]