Quiz Space

Deep Learning Practice · Quiz 2 · 12 Apr 2026 · January 2026 term

Question 2: When using Wav2Vec2Model to extract hidden states for a d…

Question 2

+4 marksOne correct option

When using Wav2Vec2Model to extract hidden states for a downstream task, you set in the model call. In PyTorch, what is the most efficient way to ensure the model does not calculate gradients or update weights during this feature extraction process, thereby saving memory and computation?

  1. A

    Use before passing the audio through the model.

  2. B

    Wrap the extraction code block with the : context manager.

  3. C

    Manually set each layer's attribute to False using a for loop before every forward pass.

  4. D

    Use the function on the output tensor to remove unnecessary dimensions.

Show answer

Correct answer

  • B

    Wrap the extraction code block with the : context manager.

Question 2 of 18 in the IIT Madras BS Deep Learning Practice (Deep Learning Practice) Quiz 2 paper sat on 12 Apr 2026, in the January 2026 term (Deep Learning Practice 06 Apr 26). It carries 4 marks.

More questions from this paper

  1. Q1The tensor has shape: When using a pre-trained Transformer-based model (such as Wav2Vec 2.0) for a downstream classific…
  2. Q3When fine-tuning a Whisper model using the Hugging Face transformers library, which of the following statements best de…
  3. Q4When working with TTS models like SpeechT5, what is the role of the speaker_embeddings?
  4. Q5Consider the following code snippet: Assume that the audio sample stored in has: : 48,000• : 13,440,000• What is the du…
  5. Q6Calculate the Word Error Rate (WER) for the following example: Actual Sentence : ASR prediction :
  6. Q7In a standard modular speaker diarization pipeline, which of the following processes are responsible for identifying an…
  7. Q8Whisper can be used as a component in a diarization pipeline in which of the following ways?
  8. Q9When implementing diarization with SpeechBrain and PyTorch, which of the following practices are recommended? (Select a…
  9. Q10You are building an ASR pipeline for Assamese. Complete the missing parts of the script to ensure the audio is resample…
  10. Q11You are building an ASR pipeline for Assamese. Complete the missing parts of the script to ensure the audio is resample…
  11. Q12You are building an ASR pipeline for Assamese. Complete the missing parts of the script to ensure the audio is resample…
  12. Q13output of print(vocabs) is as given below Based on the above data, answer the given subquestions. For the given code wh…
  13. Q14output of print(vocabs) is as given below Based on the above data, answer the given subquestions. If is generated corre…
  14. Q15In the context of Hugging Face TTS, what is the purpose of the 'Vocoder' component?
  15. Q16Why is it important to normalize or resample reference audio to 16,000 Hz when extracting speaker embeddings for models…
  16. Q17You are building an ASR pipeline for Assamese. Complete the missing parts of the script to ensure the audio is resample…
  17. Q18output of print(vocabs) is as given below Based on the above data, answer the given subquestions.