Table Of Contents
Table Of Contents

set_training

mxnet.autograd.set_training(train_mode)[source]

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:
Return type:previous state before this set.