this code:
torch::Tensor t0 = torch::zeros(1);
torch::Tensor t1 = torch::ones(1);
t1 = t0.detach().clone();
std::cout << (t1 == t0).item<bool>() << std::endl;
outputs: 1
Doesn’t it mean it works ?
this code:
torch::Tensor t0 = torch::zeros(1);
torch::Tensor t1 = torch::ones(1);
t1 = t0.detach().clone();
std::cout << (t1 == t0).item<bool>() << std::endl;
outputs: 1
Doesn’t it mean it works ?