When testing a network in PyTorch one can use with torch.no_grad():
. What is the Libtorch (C++) equivalent? Thanks!
The equivalent in LibTorch is torch::NoGradGuard no_grad
, see documentation .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.