set_training

set_training(train_mode)

Set status to training/predicting. This affects ctx.is_train in operator running context. For example, Dropout will drop inputs randomly when train_mode=True while simply passing through if train_mode=False.

Parameters:
train_mode: bool
Returns:
previous state before this set.