mighty.utils.prepare.prepare_eval

mighty.utils.prepare.prepare_eval(model)[source]

Sets the model and its parameters to the eval state.

Parameters:
modelnn.Module

An input model.

Returns:
ModelMode

A model mode state that can recover the original input state.