class_docstr: Multilayer Perceptron for binary and multi-class classification.
  
  Attributes:
    output_dim: Integer representing the number of classes.
    hidden_sizes: List containing the sizes of the hidden layers.
    activation: An activation function to apply to the output of each hidden
      layer.
    aggregation: String representing an aggregation operation that could be
      applied to the inputs. Valid options: None, `add`. If None, then no
      aggregation is performed. If `add`, the first half of the features
      dimension is added to the second half (see the `_aggregate` function
      for details).
    hidden_aggregation: A tuple or list of integers representing the number of
      hidden units in each layer of the projection network described above.
    is_binary_classification: Boolean specifying if this is model for
      binary classification. If so, it uses a different loss function and
      returns predictions with a single dimension, batch size.
    name: String representing the model name.
class_docstr_tok: ["Multilayer","Perceptron","for","binary","and","multi-class","classification",".","Attributes",":","output_dim",":","Integer","representing","the","number","of","classes",".","hidden_sizes",":","List","containing","the","sizes","of","the","hidden","layers",".","activation",":","An","activation","function","to","apply","to","the","output","of","each","hidden","layer",".","aggregation",":","String","representing","an","aggregation","operation","that","could","be","applied","to","the","inputs",".","Valid","options",":","None",",","`","add","`",".","If","None",",","then","no","aggregation","is","performed",".","If","`","add","`",",","the","first","half","of","the","features","dimension","is","added","to","the","second","half","(","see","the","`","_aggregate","`","function","for","details",")",".","hidden_aggregation",":","A","tuple","or","list","of","integers","representing","the","number","of","hidden","units","in","each","layer","of","the","projection","network","described","above",".","is_binary_classification",":","Boolean","specifying","if","this","is","model","for","binary","classification",".","If","so",",","it","uses","a","different","loss","function","and","returns","predictions","with","a","single","dimension",",","batch","size",".","name",":","String","representing","the","model","name","."]
code: def __init__(
      self,
      output_dim,
      hidden_sizes,
      activation=tf.nn.leaky_relu,
      aggregation=None,
      hidden_aggregation=(),
      is_binary_classification=False,
      name="MLP",
  ):
      super(MLP, self).__init__(
          aggregation=aggregation,
          hidden_aggregation=hidden_aggregation,
          activation=activation,
      )
      self.output_dim = output_dim
      self.hidden_sizes = hidden_sizes
      self.is_binary_classification = is_binary_classification
      self.name = name
  
file_path: neural-structured-learning/research/gam/gam/models/mlp.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from .models_base import glorot
  from .models_base import Model
  import numpy
  import tensorflow
label_desc: Use image node_id 1 to create a new MLP object from inherited base classes: Model with example: obj = MLP(output_dim, hidden_sizes, activation, aggregation, hidden_aggregation, is_binary_classification, name)