Loading TOC...


   $operand as cntk.variable,
   $block-size as (Number|String),
   $name as String
) as cntk.function


Rearranges elements in the input tensor from the spatial dimensions to the depth dimension. This is the reverse transformation of depth_to_space. This operation is useful for implementing and testing sub-pixel convolution that is part of models for image super-resolution (see [1]). It rearranges elements of an input tensor of shape (C, H, W) to a tensor of shape (C*b*b, H/b, W/b), where b is the block_size, by rearranging non-overlapping spatial blocks of size block_size x block_size into the depth/channel dimension at each location.

$operand Input tensor.
$block-size Integer value. This defines the size of the spatial block whose elements are moved to the depth dimension. Size of spatial dimensions (H, W) in the input tensor must be divisible by math:block_size.
$name The name of the function instance in the network.


  var inputVariable1 = cntk.inputVariable(cntk.shape([2,2,4]), "float",
    fn.false(), fn.false(), "feature",[])
  => cntk.function(Composite SpaceToDepth (Input(Name(feature),
  Shape([2 x 2 x 4]), Dynamic Axes([]))))

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