class_docstr: Transformer encoder consisting of *config.encoder_layers* self attention layers. Each layer is a
  [`WhisperEncoderLayer`].
  
  Args:
      config: WhisperConfig
      embed_tokens (nn.Embedding): output embedding
class_docstr_tok: ["Transformer","encoder","consisting","of","*","config.encoder_layers","*","self","attention","layers",".","Each","layer","is","a","[","`","WhisperEncoderLayer","`","]",".","Args",":","config",":","WhisperConfig","embed_tokens","(","nn.Embedding",")",":","output","embedding"]
code: def _freeze_parameters(self):
      for param in self.parameters():
          param.requires_grad = False
      self._requires_grad = False
  
imports: import math
  import random
  from typing import Optional, Tuple
  import torch
  import torch.utils.checkpoint
  from torch import nn
  from torch.nn import CrossEntropyLoss
  from ...activations import ACT2FN
  from ...modeling_outputs import BaseModelOutput, BaseModelOutputWithPastAndCrossAttentions, Seq2SeqLMOutput, Seq2SeqModelOutput
  from ...modeling_utils import PreTrainedModel
  from ...utils import add_start_docstrings, add_start_docstrings_to_model_forward, logging, replace_return_docstrings
  from .configuration_whisper import WhisperConfig
label_desc: Use image node_id 2 for calling the WhisperEncoder obj's underlying member method code with example usage: obj._freeze_parameters() without return types