towhee.trainer.utils.trainer_utils.unwrap_model

towhee.trainer.utils.trainer_utils.unwrap_model(model: torch.nn.modules.module.Module)torch.nn.modules.module.Module[source]

Unwraps a model from potential containers (as used in distributed training).

Parameters:

model (torch.nn.Module) – The model to unwrap.