class_docstr: AFM is a attention based FM model that predict the final score with the attention of input feature.
class_docstr_tok: ["AFM","is","a","attention","based","FM","model","that","predict","the","final","score","with","the","attention","of","input","feature","."]
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/context_aware_recommender/afm.py
imports: import torch
  import torch.nn
  from torch.nn.init import xavier_normal_, constant_
  from recbole.model.abstract_recommender import ContextRecommender
  from recbole.model.layers import AttLayer
label_desc: Use image node_id 2 for calling the AFM obj's underlying member method code with example usage: obj._init_weights(module) without return types