Interface to the MLP computations. More...
#include "SynapticRandomizer.hpp"
#include <vector>
#include <cstdlib>
#include <iostream>
#include <random>
#include <string>
Go to the source code of this file.
Classes | |
class | jymlp::Mlp |
Namespaces | |
namespace | jymlp::actf |
As of now, define activation functions as an enum. | |
namespace | jymlp::errt |
The error function type. | |
Enumerations | |
enum | ActF { Unset = 0, linear = 1, hyptan = 2, logsig = 3 } |
enum | ErrT { Unset = 0, q2a2 = 1, q2a1 = 2, q1a1 = 3 } |
enum | PrettyPrintStyle { plaintext = 0, latexeq = 1 } |
Interface to the MLP computations.
Cares not about multi- or single-objectivity, or anything else regarding the learning algorithm; just provides objective function values and derivatives for differentiable ones.
Implements simple ASCII-text serialization that can be easily parsed or written in Matlab or whatever analysis tool with minimal string manipulations or conversions.
All computations require an external workspace of doubles. This inconvenience provides for a couple of optimizations:
(1) The forward pass can be done only once even if the error and backpropagation phases are done for different formulations. A copy of the workspace must be made before error and gradient evaluation, but the costly sums and sigmoids need not be evaluated twice.
(2) Only one thread-wise storage could be used for sequentially evaluating a population of MLPs when the maximum required space is known beforehand.