class MLP

This class is a simple interface to the ConnectedMachine class that ca be used to build the well-known Multi Layer Perceptron type of neural networks.

Inheritance:


Public Fields

[more]Linear* hidden_layer
the first Linear layer
[more]SparseLinear* sparse_hidden_layer
the first Linear layer for sparse mode
[more]Tanh* hidden_tanh_layer
the first Tanh layer
[more]Linear* outputs_layer
the second Linear layer
[more]SparseLinear* sparse_outputs_layer
the second Linear layer for sparse mode, if there is no hidden units
[more]Softmax* outputs_softmax_layer
the optional second Softmax layer
[more]Sigmoid* outputs_sigmoid_layer
the optional second Sigmoid layer
[more]LogSoftmax* outputs_log_softmax_layer
the optional second Softmax layer
[more]Tanh* outputs_tanh_layer
the optional second Tanh layer
[more]int n_hidden
the number of hidden units
[more]int n_inputs
the number of inputs
[more]int n_outputs
the number of outputs
[more]bool is_sparse_inputs
To know if the inputs are sparse
[more]bool inputs_to_outputs
if this is true, add a direct connection from inputs to Linear
[more]real weight_decay
the eventual weight_decay
[more]Linear* add_layer
the direct Linear layer
[more]SumMachine* sum_layer
if inputs_to_outputs is true, we also need a SumMachine

Public Members

[more] if this is false, add a Tanh layer
[more] Flags (in order of priority if several are true) to know what will be the output


Inherited from ConnectedMachine:

Public Methods

ovoid addFCL(GradientMachine* machine)
ovoid addMachine(GradientMachine* machine)
ovoid connectOn(GradientMachine* machine)
ovoid addLayer()


Inherited from GradientMachine:

Public Fields

obool is_free
oList* params
oList* der_params
oint n_params
oreal* beta

Public Methods

ovirtual void init()
ovirtual int numberOfParams()
ovirtual void iterInitialize()
ovirtual void backward(List* inputs, real* alpha)
ovirtual void allocateMemory()
ovirtual void freeMemory()
ovirtual void loadFILE(FILE* file)
ovirtual void saveFILE(FILE* file)


Inherited from Machine:

Public Fields

oList* outputs

Public Methods

ovirtual void forward(List* inputs)
ovirtual void reset()


Inherited from Object:

Public Methods

ovoid addOption(const char* name, int size, void* ptr, const char* help="", bool is_allowed_after_init=false)
ovoid addIOption(const char* name, int* ptr, int init_value, const char* help="", bool is_allowed_after_init=false)
ovoid addROption(const char* name, real* ptr, real init_value, const char* help="", bool is_allowed_after_init=false)
ovoid addBOption(const char* name, bool* ptr, bool init_value, const char* help="", bool is_allowed_after_init=false)
ovoid setOption(const char* name, void* ptr)
ovoid setIOption(const char* name, int option)
ovoid setROption(const char* name, real option)
ovoid setBOption(const char* name, bool option)
ovoid load(const char* filename)
ovoid save(const char* filename)


Documentation

This class is a simple interface to the ConnectedMachine class that ca be used to build the well-known Multi Layer Perceptron type of neural networks. It contains a layer of Linear followed by a layer of Tanh, followed by a layer of Linear and optionally Optionally, it also contains a direct connection from the inputs to the linear layer, and if you want, you can choose sparse inputs.

Options:
"inputs to outputs" bool connections from inputs to outputs [false]
"weight decay" real the weight decay [0]
"softmax outputs" bool softmax outputs [false]
"sigmoid outputs" bool sigmoid outputs [false]
"log-softmax outputs" bool log-softmax outputs [false]
"tanh outputs" bool tanh outputs [false]
"sparse inputs" bool sparse inputs (to use with SparseDataSet) [false]

oLinear* hidden_layer
the first Linear layer

oSparseLinear* sparse_hidden_layer
the first Linear layer for sparse mode

oTanh* hidden_tanh_layer
the first Tanh layer

oLinear* outputs_layer
the second Linear layer

oSparseLinear* sparse_outputs_layer
the second Linear layer for sparse mode, if there is no hidden units

oSoftmax* outputs_softmax_layer
the optional second Softmax layer

oSigmoid* outputs_sigmoid_layer
the optional second Sigmoid layer

oLogSoftmax* outputs_log_softmax_layer
the optional second Softmax layer

oTanh* outputs_tanh_layer
the optional second Tanh layer

oint n_hidden
the number of hidden units

oint n_inputs
the number of inputs

oint n_outputs
the number of outputs

o if this is false, add a Tanh layer
if this is false, add a Tanh layer

o Flags (in order of priority if several are true) to know what will be the output
Flags (in order of priority if several are true) to know what will be the output

obool is_sparse_inputs
To know if the inputs are sparse

obool inputs_to_outputs
if this is true, add a direct connection from inputs to Linear

oreal weight_decay
the eventual weight_decay

oLinear* add_layer
the direct Linear layer

oSumMachine* sum_layer
if inputs_to_outputs is true, we also need a SumMachine


This class has no child classes.
Author:
Samy Bengio (bengio@idiap.ch) Ronan Collobert (collober@iro.umontreal.ca)

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.