Keraflow
Deep Learning for Python.
 All Classes Namespaces Functions Pages
keraflow.layers.convolution.Convolution1D Class Reference

Convolution layer for convolving (sequence_length, input_dim) inputs. More...

Inheritance diagram for keraflow.layers.convolution.Convolution1D:
keraflow.layers.convolution.ConvolutionBase

Public Member Functions

def __init__
 
- Public Member Functions inherited from keraflow.layers.convolution.ConvolutionBase
def __init__
 

Detailed Description

Convolution layer for convolving (sequence_length, input_dim) inputs.

  • input_shape: 3D, (nb_samples, sequence_length, input_dim)
  • output_shape: 3D, (nb_samples, output_sequence_length, nb_kernel)
  • parameters:
    • W: (1, 1, kernel_row, input_col)
    • b: (nb_kernel,)
Note
  1. output_sequence_length is determined by pad and stride. For details, please see ConvolutionBase.
  2. The shape of W has two additional dimensions (the 1s) due to implementation issue. Be aware of this when initializing the layer with initial_weights argument.

Constructor & Destructor Documentation

def keraflow.layers.convolution.Convolution1D.__init__ (   self,
  nb_kernel,
  kernel_row,
  stride = 1,
  pad = 'valid',
  bias = True,
  init = 'uniform',
  activation = 'linear',
  kwargs 
)
Parameters
nb_kernelint. Number of convolution kernels to use.
kernel_rowint. The height of the each kernel. The width of kernel will always be the input's width.
strideint. Step for vertically sliding each kernel for convolution.
padstr, 'valid' of 'same'. See ConvolutionBase
biasboolean. Whether to include a bias (i.e. make the layer affine rather than linear).
initstr/function. Function to initialize trainable parameters. See Initializations.
activationstr/function. Activation function applied on the output. See Activations.
kwargssee Layer.__init__.