Table Of Contents
Table Of Contents

train_mode

mxnet.autograd.train_mode()[source]

Returns a scope context to be used in ‘with’ statement in which forward pass behavior is set to training mode, without changing the recording states.

Example:

y = model(x)
with autograd.train_mode():
    y = dropout(y)