Propagates the input from the visible layer up to the top layer
Propagates the input from the visible layer up to the top layer
Builds a neural net of the right type and of the right shape out of specified layers.
Builds a neural net of the right type and of the right shape out of specified layers.
Note that this method depends on instance, not just a class:
fore example the Autoencoder has to know what it's 'central'
Layer is.
Given hidden activation, samples a hidden state, calculates visible activation, and samples visible state.
Given hidden activation, samples a hidden state, calculates visible activation, and samples visible state.
If sampleVisibleStatesDeterministically is set to true,
activations of visible neurons are returned directly, no
random sampling occurs for visible neurons in this case.
Calculates (very coarse) approximations of partial derivatives of the logarithmized probability of the minibatch w.
Calculates (very coarse) approximations of partial derivatives of the logarithmized probability of the minibatch w.r.t. biases of the unit layers and weights of the connection layer.
tuple containing three matrices that correspond to derivatives w.r.t. biases of visible units, weights, and hidden units respectively.
Extracts average visible unit state, average hidden unit activation, and average products of visible states and hidden activations from the samples of visible units and hidden activations.
Extracts average visible unit state, average hidden unit activation, and average products of visible states and hidden activations from the samples of visible units and hidden activations.
The dimensions of extracted matrices correspond to dimensions of visible biases, weight Mat, and hidden biases respectively.
Performs Gibbs sampling steps times, starting with
the input clamped to the visible layer.
Performs Gibbs sampling steps times, starting with
the input clamped to the visible layer.
If steps is zero, the visible input together with
hidden layer activation is returned (useful for collecting positive
statistics in contrastive divergence).
If steps is greater than zero, returns visible reconstruction and
exact hidden layer activations after specified number of steps.
If sampleVisibleUnitsDeterministically is set to true, then
activations of the visible units are used instead of random samples.
The hidden units are always updated randomly.
Enumerates layers of this (linear) neural net.
Enumerates layers of this (linear) neural net.
TODO: generalize it to arbitrary directed acyclic graphs, what's so special about lists?...
Performs optimization of all parameters of the neural network
using the specified input and output, the specified method
to define an error function (defaults to SquareErrorFunctionFactory).
Performs optimization of all parameters of the neural network
using the specified input and output, the specified method
to define an error function (defaults to SquareErrorFunctionFactory).
Standard feed-forward algorithm is used for evaluation of the function, backpropagation is used for calculation of the gradient.
Assumes that this is a "usual" neural net with alternating unit and connection layers and prepends an affine linear transformation to it.
Assumes that this is a "usual" neural net with alternating unit and connection layers and prepends an affine linear transformation to it.
Why the heck did I implement biased layers at all, why didn't I stuff all this cruft into something like "AffineLinearTransform" or so... Damn
Propagates the output from top layer down to the visible layer
Propagates the output from top layer down to the visible layer
Trains this Rbm with the data contained in the minibatches with parameters specified in the configuration.
Trains this Rbm with the data contained in the minibatches with parameters specified in the configuration.
Returns the training data processed by the trained Rbm
Represents a restricted Boltzmann machine, which consists of two layers of neurons connected with a full bipartite graph.