
Last chance! 50% off unlimited learning
Sale ends in
if (torch_is_installed()) {
x = torch_randn(c(3, 4))
x
indices = torch_tensor(c(1, 3), dtype = torch_int64())
torch_index_select(x, 1, indices)
torch_index_select(x, 2, indices)
}
Run the code above in your browser using DataLab