Reputation: 374
When testing a network in PyTorch one can use with torch.no_grad():
. What is the Libtorch (C++) equivalent?
Thanks!
Upvotes: 9
Views: 3889
Reputation: 40768
The equivalent in LibTorch is torch::NoGradGuard no_grad
, see documentation.
Upvotes: 11