Closed jerry9055 closed 1 year ago
Hi, I am new to libtorch/c++, and I confused when setting values to a torch::Tensor with indexput() here is my case I fail to set values except for X[0][...] Would you like to tell me how to set values in Tensor? Thanks
The combination of indexput and index functions can achieve this task. https://github.com/AllentDan/LibtorchTutorials/tree/main/lesson2-TensorOperations
Hi, I am new to libtorch/c++, and I confused when setting values to a torch::Tensor with indexput() here is my case I fail to set values except for X[0][...] Would you like to tell me how to set values in Tensor? Thanks