class_docstr: NARM explores a hybrid encoder with an attention mechanism to model the user’s sequential behavior,
  and capture the user’s main purpose in the current session.
class_docstr_tok: ["NARM","explores","a","hybrid","encoder","with","an","attention","mechanism","to","model","the","user","\u2019","s","sequential","behavior",",","and","capture","the","user","\u2019","s","main","purpose","in","the","current","session","."]
code: def _init_weights(self, module):
      if isinstance(module, nn.Embedding):
          xavier_normal_(module.weight.data)
      elif isinstance(module, nn.Linear):
          xavier_normal_(module.weight.data)
          if module.bias is not None:
              constant_(module.bias.data, 0)
  
file_path: RecBole/recbole/model/sequential_recommender/narm.py
imports: import torch
  from torch import nn
  from torch.nn.init import xavier_normal_, constant_
  from recbole.model.abstract_recommender import SequentialRecommender
  from recbole.model.loss import BPRLoss
label_desc: Use image node_id 2 for calling the NARM obj's underlying member method code with example usage: obj._init_weights(module) without return types