# NOT RUN {
if (torch_is_installed()) {
if (torch::cuda_is_available()) {
a <- torch_tensor(c(5, 10, 15))
b <- torch_tensor(c(3, 4, 5))
torch_gcd(a, b)
c <- torch_tensor(c(3))
torch_gcd(a, c)
}
}
# }
Run the code above in your browser using DataLab