class_docstr: Multi-Layer Perceptron.
  
  Parameters
  ----------
  layers: list, optional, default: [64, 32, 16, 8]
      MLP layers. Note that the first layer is the concatenation of
      user and item embeddings. So layers[0]/2 is the embedding size.
  
  act_fn: str, default: 'relu'
      Name of the activation function used for the MLP layers.
      Supported functions: ['sigmoid', 'tanh', 'elu', 'relu', 'selu, 'relu6', 'leaky_relu']
  
  reg: float, optional, default: 0.
      Regularization (weight_decay).
  
  num_epochs: int, optional, default: 20
      Number of epochs.
  
  batch_size: int, optional, default: 256
      Batch size.
  
  num_neg: int, optional, default: 4
      Number of negative instances to pair with a positive instance.
  
  lr: float, optional, default: 0.001
      Learning rate.
  
  learner: str, optional, default: 'adam'
      Specify an optimizer: adagrad, adam, rmsprop, sgd
  
  backend: str, optional, default: 'tensorflow'
      Backend used for model training: tensorflow, pytorch
      
  early_stopping: {min_delta: float, patience: int}, optional, default: None
      If `None`, no early stopping. Meaning of the arguments:
      
      - `min_delta`: the minimum increase in monitored value on validation set to be considered as improvement,            i.e. an increment of less than min_delta will count as no improvement.
      
      - `patience`: number of epochs with no improvement after which training should be stopped.
  
  name: string, optional, default: 'MLP'
      Name of the recommender model.
  
  trainable: boolean, optional, default: True
      When False, the model is not trained and Cornac assumes that the model is already         pre-trained.
  
  verbose: boolean, optional, default: False
      When True, some running logs are displayed.
  
  seed: int, optional, default: None
      Random seed for parameters initialization.
  
  References
  ----------
  * He, X., Liao, L., Zhang, H., Nie, L., Hu, X., & Chua, T. S. (2017, April). Neural collaborative filtering.     In Proceedings of the 26th international conference on world wide web (pp. 173-182).
code: def __init__(
      self,
      name="MLP",
      layers=(64, 32, 16, 8),
      act_fn="relu",
      reg=0.0,
      num_epochs=20,
      batch_size=256,
      num_neg=4,
      lr=0.001,
      learner="adam",
      backend="tensorflow",
      early_stopping=None,
      trainable=True,
      verbose=True,
      seed=None,
  ):
      super().__init__(
          name=name,
          trainable=trainable,
          verbose=verbose,
          num_epochs=num_epochs,
          batch_size=batch_size,
          num_neg=num_neg,
          lr=lr,
          learner=learner,
          backend=backend,
          early_stopping=early_stopping,
          seed=seed,
      )
      self.layers = layers
      self.act_fn = act_fn
      self.reg = reg
  
file_path: cornac/cornac/models/ncf/recom_mlp.py
imports: import numpy
  from .recom_ncf_base import NCFBase
label_desc: Use image node_id 1 to create a new MLP object from inherited base classes: NCFBase with example: obj = MLP(name, layers, act_fn, reg, num_epochs, batch_size, num_neg, lr, learner, backend, early_stopping, trainable, verbose, seed)