class_docstr: GCSAN captures rich local dependencies via graph neural network,
   and learns long-range dependencies by applying the self-attention mechanism.
  
  Note:
  
      In the original paper, the attention mechanism in the self-attention layer is a single head,
      for the reusability of the project code, we use a unified transformer component.
      According to the experimental results, we only applied regularization to embedding.
class_docstr_tok: ["GCSAN","captures","rich","local","dependencies","via","graph","neural","network",",","and","learns","long-range","dependencies","by","applying","the","self-attention","mechanism",".","Note",":","In","the","original","paper",",","the","attention","mechanism","in","the","self-attention","layer","is","a","single","head",",","for","the","reusability","of","the","project","code",",","we","use","a","unified","transformer","component",".","According","to","the","experimental","results",",","we","only","applied","regularization","to","embedding","."]
docstr: Initialize the weights
docstr_tok: ["Initialize","the","weights"]
code: def _init_weights(self, module):
      """Initialize the weights"""
      if isinstance(module, (nn.Linear, nn.Embedding)):
          # Slightly different from the TF version which uses truncated_normal for initialization
          # cf https://github.com/pytorch/pytorch/pull/5617
          module.weight.data.normal_(
              mean=0.0, std=self.initializer_range
          )
      elif isinstance(module, nn.LayerNorm):
          module.bias.data.zero_()
          module.weight.data.fill_(1.0)
      if isinstance(module, nn.Linear) and module.bias is not None:
          module.bias.data.zero_()
  
imports: import math
  import numpy
  import torch
  from torch import nn
  from torch.nn import Parameter
  from torch.nn import functional
  from recbole.model.abstract_recommender import SequentialRecommender
  from recbole.model.layers import TransformerEncoder
  from recbole.model.loss import EmbLoss, BPRLoss
label_desc: Use image node_id 2 for calling the GCSAN obj's underlying member method code with example usage: obj._init_weights(module) without return types