在PyTorch中测试网络时,可以使用with torch.no_grad():。什么是Libtorch (C++)的等价物?谢谢!
with torch.no_grad():
发布于 2021-01-27 22:04:58
LibTorch中的等价物是torch::NoGradGuard no_grad、see documentation。
torch::NoGradGuard no_grad
https://stackoverflow.com/questions/65920683
相似问题