Glossary: Deep Learning Basics
torch.no_grad
Also written: no_grad, with torch.no_grad()
A block (or decorator) inside which results don't record gradients. Use it when only predicting, to save memory and time.
Glossary: Deep Learning Basics
Also written: no_grad, with torch.no_grad()
A block (or decorator) inside which results don't record gradients. Use it when only predicting, to save memory and time.