class_docstr: A seq2seq model with a value head in addition to the language model head.
  This class inherits from `~trl.PreTrainedModelWrapper` and wraps a
  `transformers.PreTrainedModel` class. The wrapper class supports classic functions
  such as `from_pretrained` and `push_to_hub` and also provides some additional
  functionalities such as `generate`.
  
  Args:
      pretrained_model (`transformers.PreTrainedModel`):
          The model to wrap. It should be a causal language model such as GPT2.
          or any model mapped inside the `AutoModelForSeq2SeqLM` class.
      kwargs:
          Additional keyword arguments passed along to the `ValueHead` class.
class_docstr_tok: ["A","seq2seq","model","with","a","value","head","in","addition","to","the","language","model","head",".","This","class","inherits","from","`","~trl.PreTrainedModelWrapper","`","and","wraps","a","`","transformers.PreTrainedModel","`","class",".","The","wrapper","class","supports","classic","functions","such","as","`","from_pretrained","`","and","`","push_to_hub","`","and","also","provides","some","additional","functionalities","such","as","`","generate","`",".","Args",":","pretrained_model","(","`","transformers.PreTrainedModel","`",")",":","The","model","to","wrap",".","It","should","be","a","causal","language","model","such","as","GPT2",".","or","any","model","mapped","inside","the","`","AutoModelForSeq2SeqLM","`","class",".","kwargs",":","Additional","keyword","arguments","passed","along","to","the","`","ValueHead","`","class","."]
docstr: We initialize the weights of the value head.
docstr_tok: ["We","initialize","the","weights","of","the","value","head","."]
code: def _init_weights(self, **kwargs):
      r"""
      We initialize the weights of the value head.
      """
      initializer_range = kwargs.pop("v_head_initializer_range", 0.2)
      # random init by default
      init_strategy = kwargs.pop("v_head_init_strategy", None)
      if init_strategy is None:
          # do nothing
          pass
      elif init_strategy == "normal":
          self.v_head.summary.weight.data.normal_(
              mean=0.0, std=initializer_range
          )
          self.v_head.summary.bias.data.zero_()
  
imports: import torch
  import torch.nn
  from transformers import AutoModelForCausalLM, AutoModelForSeq2SeqLM
  from .modeling_base import PreTrainedModelWrapper
label_desc: Use image node_id 6 for calling the AutoModelForSeq2SeqLMWithValueHead obj's underlying member method code with example usage: obj._init_weights() without return types