Ask a Question
Ask Question Login
Corporate Training
  1. Community
  2. Data Science
  3. Question
Data Science

How to use torch.no_grad to perform operations?

Asked by Daniel Cameron Dec 5, 2023 4.4K views 1 answer
Share

About this question

 I was training a neural network by using PyTorch for a machine learning project when I encountered a situation where I wanted to perform some operations without the tracking of gradients. How can I use torch.no_ grad() in this situation? 

Your answer

1 Answer

More Data Science discussions

Learn & Explore

Free tutorials and interview questions from industry experts — learn the skill, then get ready to prove it.

Latest Data Science Blogs

Guides, tips and career advice on Data Science from JanBask experts.