Loading TOC...

cntk:sequence-delay

cntk:sequence-delay(
   $x as cntk:variable,
   $initial-state as cntk:variable,
   $time-step as xs:integer,
   $name as xs:string
) as cntk:function

Summary

This function combines past_value() and future_value() into a single function. This is useful when the time_step is computed and can be positive, negative, or 0.

Parameters
$x The tensor (or its name) from which the past value is obtained.
$initial-state Tensor or scalar representing the initial value to be used when the input tensor is shifted in time.
$time-step The number of time steps to look into the past, where negative values mean to look into the future, and 0 means a no-op (default 1).
$name The name of the function instance in the network.

Example

  xquery version "1.0-ml";

  let $input-variable1 := cntk:input-variable(cntk:shape((2,3)), "float", fn:false(), fn:false(), "feature")
  let $model := cntk:sequence-delay($input-variable1)
  let $input-values := (cntk:value(cntk:shape((2,3)), json:to-array((1 to 24)), cntk:cpu(), "float"))
  let $pair1 := json:to-array(($input-variable1, $input-values))
  let $input-pairs := json:to-array(($pair1))
  let $output-variable := cntk:function-output($model)
  let $output-value := cntk:evaluate($model, $input-pairs, $output-variable, cntk:cpu())
  return (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.