deepy/core/runtime.py
def iftrain(self, then_branch, else_branch):
        """
        Execute `then_branch` when training.
        """
        return ifelse(self._training_flag, then_branch, else_branch, name="iftrain")
def iftrain(self, then_branch, else_branch):
        return ifelse(self._training_flag, then_branch, else_branch, name="iftrain")
def iftrain ( self , then_branch , else_branch ) : return ifelse ( self . _training_flag , then_branch , else_branch , name = "iftrain" )
Execute `then_branch` when training.
Execute then_branch when training .