PyTorch Intermediate Quiz
Explore custom layers, optimization, data loading, training loops, and model architectures
Start the quizSample questions from this quiz
A preview of the style and depth. Try each one, then reveal the answer — or skip straight to the timed quiz.
1. What is nn.Sequential?
- Sequential model
- Container stacking layers sequentially
- Layer sequence
- Model builder
Show answer
Answer: Container stacking layers sequentially. nn.Sequential is a container that passes input through layers in order. Quick way to build simple feed-forward networks.
2. What is nn.ModuleList?
- List of modules properly registered as submodules
- Module container
- Model list
- Layer list
Show answer
Answer: List of modules properly registered as submodules. nn.ModuleList holds submodules in a list. Properly registers parameters. Use when you need module iteration/indexing.
3. What is nn.ModuleDict?
- Module map
- Module dictionary
- Named modules
- Dictionary of modules with string keys
Show answer
Answer: Dictionary of modules with string keys. nn.ModuleDict holds submodules in dictionary with string keys. Useful for conditional network architectures.
Frequently asked questions
How many questions are in this PyTorch quiz?+
30 questions, with a 60-minute time limit. Every question includes a written explanation of the correct answer.
Is this PyTorch quiz free?+
Yes. Every quiz on CodexQuizz is free and needs no account. You only enter a name if you choose to post your score to the leaderboard.
What level is the intermediate quiz aimed at?+
Explore custom layers, optimization, data loading, training loops, and model architectures
Can I use this to prepare for a PyTorch interview?+
Yes. The questions cover the topics that come up in PyTorch technical screens, and the explanations are written so that a wrong answer still teaches you the underlying concept.
Ready to test your PyTorch?
30 questions, 60 minutes. Free, no sign-up.
Start now