public class Conv1dTranspose extends Deconvolution
Conv1dTranspose layer works similar to Deconvolution layer with the exception
of the number of dimension it operates on being only one, which is LayoutType.WIDTH. The
channel of the input data may be more than one, depending on what data is processed. Each filter
slides through the data with only one direction of movement along the dimension itself.
The input to a Conv1dTranspose is an NDList with a single 3-D
NDArray. The layout of the NDArray must be "NCW".
The shapes are
data: (batch_size, channel, width)
weight: (num_filter, channel, kernel[0])
bias: (num_filter,)
out: (batch_size, num_filter, out_width) out_width = f(width, kernel[0], pad[0], oPad[0], stride[0], dilate[0]) where f(x, k, p, oP, s, d) = (x-1)*s-2*p+k+oP
Both weight and bias are learn-able parameters.
Deconvolution| Modifier and Type | Class and Description |
|---|---|
static class |
Conv1dTranspose.Builder
The Builder to construct a
Conv1dTranspose type of Block. |
Deconvolution.DeconvolutionBuilder<T extends Deconvolution.DeconvolutionBuilder>bias, dilation, filters, groups, includeBias, kernelShape, outPadding, padding, stride, weightchildren, inputNames, inputShapes, parameters, parameterShapeCallbacks, version| Modifier and Type | Method and Description |
|---|---|
static Conv1dTranspose.Builder |
builder()
Creates a builder to build a
Conv1dTranspose. |
static NDList |
conv1dTranspose(NDArray input,
NDArray weight)
Applies 1D deconvolution over an input signal composed of several input planes.
|
static NDList |
conv1dTranspose(NDArray input,
NDArray weight,
NDArray bias)
Applies 1D deconvolution over an input signal composed of several input planes.
|
static NDList |
conv1dTranspose(NDArray input,
NDArray weight,
NDArray bias,
Shape stride)
Applies 1D deconvolution over an input signal composed of several input planes.
|
static NDList |
conv1dTranspose(NDArray input,
NDArray weight,
NDArray bias,
Shape stride,
Shape padding)
Applies 1D deconvolution over an input signal composed of several input planes.
|
static NDList |
conv1dTranspose(NDArray input,
NDArray weight,
NDArray bias,
Shape stride,
Shape padding,
Shape outPadding)
Applies 1D deconvolution over an input signal composed of several input planes.
|
static NDList |
conv1dTranspose(NDArray input,
NDArray weight,
NDArray bias,
Shape stride,
Shape padding,
Shape outPadding,
Shape dilation)
Applies 1D deconvolution over an input signal composed of several input planes.
|
static NDList |
conv1dTranspose(NDArray input,
NDArray weight,
NDArray bias,
Shape stride,
Shape padding,
Shape outPadding,
Shape dilation,
int groups)
Applies 1D convolution over an input signal composed of several input planes.
|
protected LayoutType[] |
getExpectedLayout()
Returns the expected layout of the input.
|
protected java.lang.String |
getStringLayout()
Returns the string representing the layout of the input.
|
protected int |
numDimensions()
Returns the number of dimensions of the input.
|
beforeInitialize, forwardInternal, getOutputShapes, loadMetadataaddChildBlock, addParameter, addParameter, addParameter, cast, clear, describeInput, forward, getChildren, getDirectParameters, getParameters, getParameterShape, initialize, initializeChildBlocks, isInitialized, loadParameters, readInputShapes, saveInputShapes, saveMetadata, saveParameters, setInitializer, setInitializer, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitforward, forward, validateLayoutprotected LayoutType[] getExpectedLayout()
getExpectedLayout in class Deconvolutionprotected java.lang.String getStringLayout()
getStringLayout in class Deconvolutionprotected int numDimensions()
numDimensions in class Deconvolutionpublic static NDList conv1dTranspose(NDArray input, NDArray weight)
input - the input NDArray of shape (batchSize, inputChannel, width)weight - filters NDArray of shape (outChannel, inputChannel/groups, width)public static NDList conv1dTranspose(NDArray input, NDArray weight, NDArray bias)
input - the input NDArray of shape (batchSize, inputChannel, width)weight - filters NDArray of shape (outChannel, inputChannel/groups, width)bias - bias NDArray of shape (outChannel)public static NDList conv1dTranspose(NDArray input, NDArray weight, NDArray bias, Shape stride)
input - the input NDArray of shape (batchSize, inputChannel, width)weight - filters NDArray of shape (outChannel, inputChannel/groups, width)bias - bias NDArray of shape (outChannel)stride - the stride of the deconvolving kernel: Shape(width)public static NDList conv1dTranspose(NDArray input, NDArray weight, NDArray bias, Shape stride, Shape padding)
input - the input NDArray of shape (batchSize, inputChannel, width)weight - filters NDArray of shape (outChannel, inputChannel/groups, width)bias - bias NDArray of shape (outChannel)stride - the stride of the deconvolving kernel: Shape(width)padding - implicit paddings on both sides of the input: Shape(width)public static NDList conv1dTranspose(NDArray input, NDArray weight, NDArray bias, Shape stride, Shape padding, Shape outPadding)
input - the input NDArray of shape (batchSize, inputChannel, width)weight - filters NDArray of shape (outChannel, inputChannel/groups, width)bias - bias NDArray of shape (outChannel)stride - the stride of the deconvolving kernel: Shape(width)padding - implicit paddings on both sides of the input: Shape(width)outPadding - Controls the amount of implicit zero-paddings on both sides of the output
for outputPadding number of points for each dimension.public static NDList conv1dTranspose(NDArray input, NDArray weight, NDArray bias, Shape stride, Shape padding, Shape outPadding, Shape dilation)
input - the input NDArray of shape (batchSize, inputChannel, width)weight - filters NDArray of shape (outChannel, inputChannel/groups, width)bias - bias NDArray of shape (outChannel)stride - the stride of the deconvolving kernel: Shape(width)padding - implicit paddings on both sides of the input: Shape(width)outPadding - Controls the amount of implicit zero-paddings on both sides of the output
for outputPadding number of points for each dimension.dilation - the spacing between kernel elements: Shape(width)public static NDList conv1dTranspose(NDArray input, NDArray weight, NDArray bias, Shape stride, Shape padding, Shape outPadding, Shape dilation, int groups)
input - the input NDArray of shape (batchSize, inputChannel, width)weight - filters NDArray of shape (outChannel, inputChannel/groups, width)bias - bias NDArray of shape (outChannel)stride - the stride of the deconvolving kernel: Shape(width)padding - implicit paddings on both sides of the input: Shape(width)outPadding - Controls the amount of implicit zero-paddings on both sides of the output
for outputPadding number of points for each dimension. Shape(width)dilation - the spacing between kernel elements: Shape(width)groups - split input into groups: input channel(input.size(1)) should be divisible by
the number of groupspublic static Conv1dTranspose.Builder builder()
Conv1dTranspose.