class_docstr: NAIS is an attention network, which is capable of distinguishing which historical items
  in a user profile are more important for a prediction. We just implement the model following
  the original author with a pointwise training mode.
  
  Note:
      instead of forming a minibatch as all training instances of a randomly sampled user which is
      mentioned in the original paper, we still train the model by a randomly sampled interactions.
docstr: Initialize the module's parameters
  
  Note:
      It's a little different from the source code, because pytorch has no function to initialize
      the parameters by truncated normal distribution, so we replace it with xavier normal distribution
docstr_tok: ["Initialize","the","module","'s","parameters","Note",":","It","'s","a","little","different","from","the","source","code",",","because","pytorch","has","no","function","to","initialize","the","parameters","by","truncated","normal","distribution",",","so","we","replace","it","with","xavier","normal","distribution"]
code: def _init_weights(self, module):
      """Initialize the module's parameters
  
      Note:
          It's a little different from the source code, because pytorch has no function to initialize
          the parameters by truncated normal distribution, so we replace it with xavier normal distribution
  
      """
      if isinstance(module, nn.Embedding):
          normal_(module.weight.data, 0, 0.01)
      elif isinstance(module, nn.Linear):
          xavier_normal_(module.weight.data)
          if module.bias is not None:
              constant_(module.bias.data, 0)
  
imports: import torch
  import torch.nn
  from torch.nn.init import constant_, normal_, xavier_normal_
  from recbole.model.abstract_recommender import GeneralRecommender
  from recbole.model.layers import MLPLayers
  from recbole.utils import InputType
label_desc: Use image node_id 2 for calling the NAIS obj's underlying member method code with example usage: obj._init_weights(module) without return types