Express a gating mechanism - wolfma61/CNTK GitHub Wiki

The simplest way is to use

BS.Boolean.If (condition, thenExpression, elseExpression)

which works with scalars as well as tensors (all arguments can broadcast).