code: def __init__(
      self,
      u_factors,
      i_factors,
      u_biases,
      i_biases,
      use_bias,
      global_mean,
      dropout,
  ):
      super(MF, self).__init__()
  
      self.use_bias = use_bias
      self.global_mean = global_mean
      self.dropout = nn.Dropout(p=dropout)
  
      self.u_factors = nn.Embedding(*u_factors.shape)
      self.i_factors = nn.Embedding(*i_factors.shape)
      self.u_factors.weight.data = torch.from_numpy(u_factors)
      self.i_factors.weight.data = torch.from_numpy(i_factors)
      if use_bias:
          self.u_biases = nn.Embedding(*u_biases.shape)
          self.i_biases = nn.Embedding(*i_biases.shape)
          self.u_biases.weight.data = torch.from_numpy(u_biases)
          self.i_biases.weight.data = torch.from_numpy(i_biases)
  
file_path: cornac/cornac/models/mf/backend_pt.py
imports: import torch
  import torch.nn
  from tqdm.auto import trange
label_desc: Use image node_id 1 to create a new MF object from inherited base classes: nn with example: obj = MF(u_factors, i_factors, u_biases, i_biases, use_bias, global_mean, dropout)