Loading TOC...

cntk:future-value

cntk:future-value(
   $x as cntk:variable,
   $initial-state as cntk:variable,
   $offset as xs:unsignedLong,
   $name as xs:string
) as cntk:function

Summary

This function returns the future value w.r.t. x. It is most often used when creating RNNs. The resulting tensor has the same shape as the input but is the next logical sample. The time_step parameter is the number of steps to look into the future and is 1 by default. If there is no future value (i.e. the current sample is the last one in the tensor) then the initial_state value is returned. The initial state can be a constant (scalar or tensor), a learnable tensor or input data (which has a batch dimension, as needed for sequence-to-sequence models).

Parameters
$x The tensor (or its name) from which the future value is obtained.
$initial-state Tensor or scalar representing the initial value to be used when the input tensor is shifted in time.
$offset The number of time steps to look into the future (default 1).
$name The name of the function instance in the network.

Example

  let $input-variable1 := cntk:input-variable(cntk:shape((3)), "float",
    fn:false(), fn:false(), "feature")
  let $input-variable2 := cntk:input-variable(cntk:shape((3)), "float",
    fn:false(), fn:false(), "feature")
  return cntk:future-value($input-variable1, $input-variable2, 8)
  => cntk:function(Composite FutureValue (Input(Name(feature), Shape([3]),
  Dynamic Axes([Sequence Axis(Default Dynamic Axis), Batch Axis(Default Batch Axis)])), Input(Name(feature), Shape([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.