docstr: Compute a penalty value uniformly over layers
  :param self:
  :param model:
  :return:
docstr_tok: ["Compute","a","penalty","value","uniformly","over","layers",":","param","self",":",":","param","model",":",":","return",":"]
code: def compute_penalty(self, model: torch.nn.Module):
      """
      Compute a penalty value uniformly over layers
      :param self:
      :param model:
      :return:
      """
  
      penalty = 0
  
      for name, parameter in model.named_parameters():
          penalty += self(parameter)
  
      return penalty
  
file_path: transfer-nlp/transfer_nlp/plugins/regularizers.py
imports: import torch
  from transfer_nlp.plugins.config import register_plugin
label_desc: Use image node_id 4 for calling the L2 obj's underlying member method code with example usage: obj.compute_penalty(model) and returns: penalty