Indian Institute of Technology Madras
BS Degree Programme · Examination & Study Paper
Introduction to Deep Learning and Generative AI
PyTorch training workflow
Official Paper
Examination Instructions & Guidelines
- Solve on notebook/paper first before checking solutions.
- MCQ: Exactly 1 option is correct. Negative marking applies.
- Scientific calculator allowed for all calculations.
- Official answer key is sealed at the end of this sheet.
Useful Reference Data for this Paper
Note: In all the questions, assume necessary imports wherever applicable.
Q1MCQ2 Marks·Choose one option
- Amodel.cuda()
- Binput_batch.cuda()
- Cinput_batch = input_batch.requires_grad_(True)
- Dinput_batch = input_batch.to(device)
- Etorch.set_default_tensor_type('torch.cuda.FloatTensor')
- Q2MCQ2 Marks·Choose one option

- AIt prevents parameters from being changed by the optimizer during the forward pass.
- BIt deallocates the model's parameters from the GPU to save memory.
- CIt disables the creation of the computational graph, saving memory and speeding up execution.
- DIt ensures that the model operates entirely on the CPU, preventing unnecessary GPU transfers.
- Q3MCQ3 Marks·Choose one option

- A

- B

- C

- D

- E

- A