All quizzes
Free quiz · 34 questions in the bank

PyTorch quiz

Test your PyTorch knowledge with a free interactive quiz — 34 questions with answers and explanations. No signup needed to play.

Question 1/5Score 0

What does `torch.no_grad()` do?

Questions in this quiz
  1. What does `torch.no_grad()` do?
  2. How do you put a model into evaluation mode for inference?
  3. What is PyTorch?
  4. How do you check if a GPU is available?
  5. Why must you call `optimizer.zero_grad()` before each `.backward()` call in a training loop?
  6. What is a `Dataset` and `DataLoader` used for?
  7. What does a loss function like `nn.CrossEntropyLoss` compute?
  8. What does `requires_grad=True` on a tensor do?
  9. What is an activation function like `nn.ReLU` for?
  10. What is `nn.Linear(in_features, out_features)`?
  11. How do you reshape a tensor without changing its data?
  12. How do you save a trained model's weights?
Gaps to close?
Read the curated PyTorch notes — core concepts, patterns, interview prep.
PyTorch notes

More quizzes

.NET.NET MAUIAbsintheAccessibilityActixActix Web