Loading TOC...

cntk.leakyReLu

cntk.leakyReLu(
   $x as cntk.variable,
   $alpha as cntk.double,
   [$name as String]
) as cntk.function

Summary

Leaky Rectified linear operation. Computes the element-wise leaky rectified linear of x: max(x, 0) for x >= 0 and x: alpha*x otherwise. The output tensor has the same shape as x.

Parameters
$x Any Function that outputs a tensor.
$alpha The alpha term of the above equation.
$name The name of the function instance in the network.

Example

  var inputVariable1 = cntk.inputVariable(cntk.shape([3]), "float",
    fn.false(), fn.false(), "feature")
  var inputVariable2 = cntk.inputVariable(cntk.shape([3]), "float",
    fn.false(), fn.false(), "feature")
  cntk.leakyReLu(inputVariable2, 2705229300.769880, "+5")
  => cntk.function(Composite LeakyReLU (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.