class_docstr: RecVAE, a recommender system based on a Variational Autoencoder.
  
  Parameters
  ----------
  name : str, optional, default: 'RecVae'
      Name of the recommender model.
  
  hidden_dim : int, optional, default: 600
      Dimension of the hidden layer in the VAE architecture.
  
  latent_dim : int, optional, default: 200
      Dimension of the latent layer in the VAE architecture.
  
  batch_size : int, optional, default: 500
      Size of the batches used during training.
  
  beta : float, optional
      Weighting factor for the KL divergence term in the VAE loss function.
  
  gamma : float, optional, default: 0.005
      Weighting factor for the regularization term in the loss function.
  
  lr : float, optional, default: 5e-4
      Learning rate for the optimizer.
  
  n_epochs : int, optional, default: 50
      Number of epochs to train the model.
  
  n_enc_epochs : int, optional, default: 3
      Number of epochs to train the encoder part of VAE.
  
  n_dec_epochs : int, optional, default: 1
      Number of epochs to train the decoder part of VAE.
  
  not_alternating : boolean, optional, default: False
      If True, the model training will not alternate between encoder and decoder.
  
  trainable : boolean, optional, default: True
      When False, the model will not be re-trained, and input of pre-trained parameters are required.
  
  verbose : boolean, optional, default: False
      When True, running logs are displayed.
  
  seed : int, optional
      Random seed for weight initialization and training reproducibility.
  
  use_gpu : boolean, optional, default: True
      When True, training utilizes GPU if available.
  
  References
  ----------
  * RecVAE GitHub Repository: https://github.com/ilya-shenbin/RecVAE
  * Paper Link: https://arxiv.org/abs/1912.11160
code: def run(
      self,
      model,
      opts,
      train_set,
      my_batch_size,
      n_epochs,
      beta,
      gamma,
      dropout_rate,
  ):
      import torch
  
      train_data = train_set.csr_matrix
      model.train()
      for _ in range(n_epochs):
          for i, batch_ids in enumerate(
              train_set.user_iter(my_batch_size, shuffle=True)
          ):
              ratings = torch.Tensor(
                  (train_data[batch_ids, :]).toarray()
              ).to(self.device)
  
              for optimizer in opts:
                  optimizer.zero_grad()
  
              _, loss = model(
                  ratings,
                  beta=beta,
                  gamma=gamma,
                  dropout_rate=dropout_rate,
              )
              loss.backward()
  
              for optimizer in opts:
                  optimizer.step()
  
file_path: cornac/cornac/models/recvae/recom_recvae.py
imports: import numpy
  from tqdm.auto import trange
  from ..recommender import Recommender
  from ...exception import ScoreException
label_desc: Use image node_id 2 for calling the RecVAE obj's underlying member method code with example usage: obj.run(model, opts, train_set, my_batch_size, n_epochs, beta, gamma, dropout_rate) without return types