Loading TOC...

cntk:convolution-transpose-1d-layer

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

Summary

Layer factory function to create a convolution-transpose-1D layer.

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

"filter-shape": xs:unsignedLong*.

"num-filters": xs:unsignedLong.

"activation": xs:string. The optional activation to apply at the end.

"init": xs:double, or cntk:value, or cntk:initializer. Default: cntk:glorot-uniform-initializer().

"pad": xs:boolean*. Default: false.

"strides": xs:unsignedLong*. Default: 1.

"sharing": xs:boolean. Default: true.

"bias": xs:boolean. Default: true.

"bias-init": xs:double, or cntk:initializer. Default: 0.

"output-shape": xs:unsignedLong*.

"reduction-rank": xs:integer. Default: 1.

"dilation": xs:unsignedLong*. Default: 1.

"max-temp-mem-size-in-samples": xs:unsignedLong. Default: 0.

"name": xs:string. Default: ""

Example

xquery version "1.0-ml";
let $shape := cntk:shape((640,3))
let $input-variable := cntk:input-variable($shape, "float", fn:false(), fn:false(), "feature")
let $model := cntk:convolution-transpose-1d-layer($input-variable, 
map:map()=>
map:with("activation", "identity")=>
map:with("filter-shape",(5))=>
map:with("num-filters", 128)=>
map:with("strides", (2,1))=>
map:with("pad", (fn:true()))=>
map:with("reduction-rank", 1)=>
map:with("sharing",(fn:true()))=>
map:with("bias-init", 2)=>
map:with("dilation",1)=>
map:with("init",cntk:glorot-uniform-initializer())=>
map:with("bias-init",3 )

)

let $input-value := cntk:sequence($shape, json:to-array((1 to 1920)),fn:true(), cntk:cpu(), "float")
let $pair := json:to-array(($input-variable, $input-value))
let $output-variable := cntk:function-output($model)
let $output-value := cntk:evaluate($model, $pair, $output-variable, cntk:cpu())
return (
"Value Shape : ", xdmp:quote(cntk:value-shape($output-value)), "
", 
"Value Device : ", xdmp:quote(cntk:value-device($output-value)), "
", 
"Variable Owner : ", xdmp:quote(cntk:variable-owner($output-variable)), "
", 
"Result Type : ", xdmp:type(cntk:value-to-array($output-variable, $output-value)))

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