model3.ConvLayer1D

class model3.ConvLayer1D(size, outchn, dilation_rate=1, stride=1, pad='SAME', activation=-1, batch_norm=False, usebias=True)

High-level convolution 1D layer

__init__(size, outchn, dilation_rate=1, stride=1, pad='SAME', activation=-1, batch_norm=False, usebias=True)
Parameters:
  • size (int or list[int]) – Indicate the size of convolution kernel.
  • outchn (int) – Number of output channels
  • stride (int or list[int]) – Stride number. Can be either integer or list of integers
  • pad (String) – Padding method, must be one of ‘SAME’, ‘VALID’, ‘SAME_LEFT’. ‘VALID’ does not use auto-padding scheme. ‘SAME’ uses tensorflow-style auto-padding and ‘SAME_LEFT’ uses pytorch-style auto-padding.
  • dilation_rate (int or list[int]) – Dilation rate. Can be either integer or list of integers. When dilation_rate is larger than 1, stride should be 1.
  • usebias (bool) – Whether to add bias term in this layer.
  • activation – Same candidates as layers3.activate
  • batch_norm (bool) – Whether to use batch normalization in this layer.
call(x)
Parameters:x – Input tensor or numpy array. The object will be automatically converted to tensor if the input is np.array. Note that other arrays in args or kwargs will not be auto-converted.
Returns:Tensor or a list of tensor.