Loading TOC...

cntk:convolution-transpose

cntk:convolution-transpose(
   $convolution-map as cntk:variable,
   $operand as cntk:variable,
   $additional-parameters as map:map
) as cntk:function

Summary

Layer factory function to create a convolution transpose layer. This implements a convolution_transpose operation over items arranged on an N-dimensional grid, such as pixels in an image. Typically, each item is a vector (e.g. pixel: R,G,B), and the result is, in turn, a vector. The item-grid dimensions are referred to as the spatial dimensions (e.g. dimensions of an image), while the vector dimensions of the individual items are often called feature-map depth. Convolution transpose is also known as fractionally strided convolutional layers, or, deconvolution. This operation is used in image and language processing applications. It supports arbitrary dimensions, strides, and padding. The forward and backward computation of convolution transpose is the inverse of convolution. That is, during forward pass the input layer’s items are spread into the output same as the backward spread of gradients in convolution. The backward pass, on the other hand, performs a convolution same as the forward pass of convolution. The size (spatial extent) of the receptive field for convolution transpose is given by filter_shape. E.g. to specify a 2D convolution transpose, filter_shape should be a tuple of two integers, such as (5,5); an example for a 3D convolution transpose (e.g. video or an MRI scan) would be filter_shape=(3,3,3); while for a 1D convolution transpose (e.g. audio or text), filter_shape has one element, such as (3,). The dimension of the input items (feature-map depth) is not specified, but known from the input. The dimension of the output items generated for each item position is given by num_filters. A ConvolutionTranspose instance owns its weight parameter tensors W and b, and exposes them as an attributes .W and .b. The weights will have the shape (input_feature_map_depth, num_filters, *filter_shape).

Parameters
$convolution-map
$operand The operand of the operation.
$additional-parameters

Example

  xquery version "1.0-ml";
  let $x := cntk:input-variable(cntk:shape((3,3)), "float")
  let $kernel := cntk:input-variable(cntk:shape((2,2)), "float")
  let $model := cntk:convolution-transpose($kernel, $x, map:map()=>map:with("auto-padding", fn:false())=>map:with("output-shape", cntk:shape((0))))
  return fn:replace(xdmp:quote($model), "Input[0-9]*", "Input")
  => cntk:function(Composite Convolution (Input(Uid(Input), Shape([2 x 2]), Dynamic Axes([Sequence Axis(Default Dynamic Axis), Batch Axis(Default Batch Axis)])), Input(Uid(Input), Shape([3 x 3]), Dynamic Axes([Sequence Axis(Default Dynamic Axis), Batch Axis(Default Batch Axis)]))))

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.