Loading TOC...

cntk:clip

cntk:clip(
   $operand as cntk:variable,
   $min as cntk:variable,
   $max as cntk:variable,
   $name as xs:string
) as cntk:function

Summary

Computes a tensor with all of its values clipped to fall between min_value and max_value, i.e. min(max(x, min_value), max_value). The output tensor has the same shape as x.

Parameters
$operand Tensor to be clipped.
$min A scalar or a tensor which represents the minimum value to clip element values to.
$max A scalar or a tensor which represents the maximum value to clip element values to.
$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")
  let $input-variable3 := cntk:input-variable(cntk:shape((3)), "float",
    fn:false(), fn:false(), "feature")
  return cntk:clip($input-variable1, $input-variable2, $input-variable3)
  => cntk:function(Composite Clip (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)])), 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.