theanets.layers.convolution.Convolution¶
-
class
theanets.layers.convolution.
Convolution
(filter_shape, stride=(1, 1), border_mode='valid', **kwargs)¶ Convolution layers convolve filters over the input arrays.
Parameters: filter_shape : (int, int)
Shape of the convolution filters for this layer.
stride : (int, int), optional
Apply convolutions with this stride; i.e., skip this many samples between convolutions. Defaults to (1, 1)—that is, no skipping.
border_mode : str, optional
Compute convolutions with this border mode. Defaults to ‘valid’.
-
__init__
(filter_shape, stride=(1, 1), border_mode='valid', **kwargs)¶
Methods
__init__
(filter_shape[, stride, border_mode])add_conv_weights
(name[, mean, std, sparsity])Add a convolutional weight array to this layer’s parameters. 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. -
add_conv_weights
(name, mean=0, std=None, sparsity=0)¶ Add a convolutional weight array to this layer’s parameters.
Parameters: name : str
Name of the parameter to add.
mean : float, optional
Mean value for randomly-initialized weights. Defaults to 0.
std : float, optional
Standard deviation of initial matrix values. Defaults to \(1 / sqrt(n_i + n_o)\).
sparsity : float, optional
Fraction of weights to set to zero. Defaults to 0.
-