layers3.deconv1D

class layers3.deconv1D(size, outchn, stride=1, pad='SAME', dilation_rate=1, usebias=True, values=None)

Basic transposed convolution 1D layer

__init__(size, outchn, stride=1, pad='SAME', dilation_rate=1, usebias=True, values=None)
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’ or ‘VALID’. ‘VALID’ does not use auto-padding scheme. ‘SAME’ uses tensorflow-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.
  • values (list[np.array]) – If the param ‘values’ is set, the layer will be initialized with the list of numpy array.
build(input_shape)

Creates the variables of the layer (optional, for subclass implementers).

This is a method that implementers of subclasses of Layer or Model can override if they need a state-creation step in-between layer instantiation and layer call.

This is typically used to create the weights of Layer subclasses.

Parameters:input_shape – Instance of TensorShape, or list of instances of TensorShape if the layer expects a list of inputs (one instance per input).
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.