What is the LibTorch equivalent to PyTorch’s torch.no_grad?

  autograd, c++, libtorch, python, pytorch

When testing a network in PyTorch one can use with torch.no_grad():. What is the Libtorch (C++) equivalent?
Thanks!

Source: Windows Questions C++

LEAVE A COMMENT