theanets.layers.feedforward.Feedforward¶
-
class
theanets.layers.feedforward.
Feedforward
(size, inputs, name=None, activation='logistic', **kwargs)¶ A feedforward neural network layer performs a transform of its input.
More precisely, feedforward layers as implemented here perform an affine transformation of their input, followed by a potentially nonlinear “activation” function performed elementwise on the transformed input.
Feedforward layers are the fundamental building block on which most neural network models are built.
-
__init__
(size, inputs, name=None, activation='logistic', **kwargs)¶
Methods
setup
()Set up the parameters and initial values for this layer. transform
(inputs)Transform the inputs for this layer into an output for the layer. Attributes
input_size
For networks with one input, get the input size. num_params
Total number of learnable parameters in this layer. params
A list of all parameters in this layer. -
setup
()¶ Set up the parameters and initial values for this layer.
-
transform
(inputs)¶ Transform the inputs for this layer into an output for the layer.
Parameters: inputs : dict of Theano expressions
Symbolic inputs to this layer, given as a dictionary mapping string names to Theano expressions. See
Layer.connect()
.Returns: outputs : dict of Theano expressions
A map from string output names to Theano expressions for the outputs from this layer. This layer type generates a “pre” output that gives the unit activity before applying the layer’s activation function, and an “out” output that gives the post-activation output.
updates : list of update pairs
An empty list of updates to apply from this layer.
-