class_docstr: MacridVAE is an item-based collaborative filtering model that learns disentangled representations from user
  behavior and simultaneously ranks all items for each user.
  
  We implement the model following the original author.
class_docstr_tok: ["MacridVAE","is","an","item-based","collaborative","filtering","model","that","learns","disentangled","representations","from","user","behavior","and","simultaneously","ranks","all","items","for","each","user",".","We","implement","the","model","following","the","original","author","."]
code: def __init__(self, config, dataset):
      super(MacridVAE, self).__init__(config, dataset)
  
      self.layers = config["encoder_hidden_size"]
      self.embedding_size = config["embedding_size"]
      self.drop_out = config["dropout_prob"]
      self.kfac = config["kfac"]
      self.tau = config["tau"]
      self.nogb = config["nogb"]
      self.anneal_cap = config["anneal_cap"]
      self.total_anneal_steps = config["total_anneal_steps"]
      self.regs = config["reg_weights"]
      self.std = config["std"]
  
      self.update = 0
      self.build_histroy_items(dataset)
      self.encode_layer_dims = (
          [self.n_items] + self.layers + [self.embedding_size * 2]
      )
  
      self.encoder = self.mlp_layers(self.encode_layer_dims)
  
      self.item_embedding = nn.Embedding(
          self.n_items, self.embedding_size
      )
      self.k_embedding = nn.Embedding(self.kfac, self.embedding_size)
  
      self.l2_loss = EmbLoss()
      # parameters initialization
      self.apply(xavier_normal_initialization)
  
file_path: RecBole/recbole/model/general_recommender/macridvae.py
imports: import torch
  import torch.nn
  import torch.nn.functional
  from recbole.model.abstract_recommender import AutoEncoderMixin, GeneralRecommender
  from recbole.model.init import xavier_normal_initialization
  from recbole.model.loss import EmbLoss
  from recbole.utils import InputType
label_desc: Use image node_id 1 to create a new MacridVAE object from inherited base classes: GeneralRecommender, AutoEncoderMixin with example: obj = MacridVAE(config, dataset)