Keraflow
Deep Learning for Python.
|
Base layer for convolution layers. More...
Public Member Functions | |
def | __init__ |
Base layer for convolution layers.
Do not use this layer in your code.
def keraflow.layers.convolution.ConvolutionBase.__init__ | ( | self, | |
kernel_shape, | |||
strides, | |||
pad = 'valid' , |
|||
bias = True , |
|||
init = 'glorot_uniform' , |
|||
activation = 'linear' , |
|||
kwargs | |||
) |
kernel_shape | tuple of int. Shape of the kernel in the pattern (nb_kernel, k_rows, k_cols ...) . |
strides | tuple of int. Steps for sliding each kernel for convolution. |
pad | str, 'valid' of 'same' . See descriptions below. |
bias | boolean. Whether to include a bias (i.e. make the layer affine rather than linear). |
init | str/function. Function to initialize trainable parameters. See Initializations. |
activation | str/function. Activation function applied on the output. See Activations. |
kwargs | see Layer.__init__. |
pad='same'
, the output length (for each dimension) is computed as: And the padding (for each dimension) is computed as: stride=1
, output_length
will be equal to input_length
, which is the reason for the name same
.pad='valid'
, the output length (for each dimension) is computed as: And the padding is always 0. When stride=1
, output_length
will be equal to input_length-1
.