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 forward(self, interaction):
      afm_all_embeddings = self.concat_embed_input_fields(
          interaction
      )  # [batch_size, num_field, embed_dim]
  
      output = self.first_order_linear(interaction) + self.afm_layer(
          afm_all_embeddings
      )
      return output.squeeze(-1)
  
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 5 for calling the AFM obj's underlying member method code with example usage: obj.forward(interaction) and returns: output