class_docstr: HGN sets feature gating and instance gating to get the important feature and item for predicting the next item
docstr: choose the features that will be sent to the next stage(more important feature, more focus)
docstr_tok: ["choose","the","features","that","will","be","sent","to","the","next","stage","(","more","important","feature",",","more","focus",")"]
code: def feature_gating(self, seq_item_embedding, user_embedding):
      """
  
      choose the features that will be sent to the next stage(more important feature, more focus)
      """
  
      batch_size, seq_len, embedding_size = seq_item_embedding.size()
      seq_item_embedding_value = seq_item_embedding
  
      seq_item_embedding = self.w1(seq_item_embedding)
      # batch_size * seq_len * embedding_size
      user_embedding = self.w2(user_embedding)
      # batch_size * embedding_size
      user_embedding = user_embedding.unsqueeze(1).repeat(1, seq_len, 1)
      # batch_size * seq_len * embedding_size
  
      user_item = self.sigmoid(
          seq_item_embedding + user_embedding + self.b
      )
      # batch_size * seq_len * embedding_size
  
      user_item = torch.mul(seq_item_embedding_value, user_item)
      # batch_size * seq_len * embedding_size
  
      return user_item
  
file_path: RecBole/recbole/model/sequential_recommender/hgn.py
imports: import torch
  import torch.nn
  from torch.nn.init import xavier_uniform_, constant_, normal_
  from recbole.model.abstract_recommender import SequentialRecommender
  from recbole.model.loss import BPRLoss
label_desc: Use image node_id 4 for calling the HGN obj's underlying member method code with example usage: obj.feature_gating(seq_item_embedding, user_embedding) and returns: user_item