class_docstr: Base class for all neural network modules.
class_docstr_tok: ["Base","class","for","all","neural","network","modules","."]
code: def __init__(
      self,
      activation_func,
      rating_values,
      n_users,
      n_items,
      gcn_agg_units,
      gcn_out_units,
      gcn_dropout,
      gcn_agg_accum,
      gen_r_num_basis_func,
      share_param,
      device,
  ):
      super(NeuralNetwork, self).__init__()
      self._act = get_activation(activation_func)
      self.encoder = GCMCLayer(
          rating_values,
          n_users,
          n_items,
          gcn_agg_units,
          gcn_out_units,
          gcn_dropout,
          gcn_agg_accum,
          agg_act=self._act,
          share_user_item_param=share_param,
          device=device,
      )
      self.decoder = BiDecoder(
          in_units=gcn_out_units,
          num_classes=len(rating_values),
          num_basis=gen_r_num_basis_func,
      )
  
imports: import dgl.function
  import dgl.nn.pytorch
  from dgl import DGLError
  import torch
  import torch.nn
  from torch.nn import init
  from .utils import get_activation
label_desc: Use image node_id 1 to create a new NeuralNetwork object from inherited base classes: nn with example: obj = NeuralNetwork(activation_func, rating_values, n_users, n_items, gcn_agg_units, gcn_out_units, gcn_dropout, gcn_agg_accum, gen_r_num_basis_func, share_param, device)