gtnn.generators

gtnn.generators.mlp

gtnn.generators.mlp.mlp(sizes, weightGenerator=<built-in method random_sample of mtrand.RandomState object at 0x2ab51ce07ae0>, biasGenerator=<built-in method random_sample of mtrand.RandomState object at 0x2ab51ce07ae0>, activationFunction=<gtnn.network.activation.LogSigmoid instance at 0x2ab5438f6b90>)[source]

Generate Multilayer Perceptron (MLP) and return as a Net

Parameters:
  • sizes (list of integers) – Size of each layer
  • weightGenerator (functor) – Functor for generating weights
  • biasGenerator (functor) – Functor for generating bias values
  • activationFunction (Activation function) – Activation function - the same for all neurons
Returns:

Net object with the requested architecture

Return type:

Net