(model)
| 320 | |
| 321 | |
| 322 | def get_model_state(model): |
| 323 | # if isinstance(model, torch.nn.parallel.DistributedDataParallel): |
| 324 | if isinstance(model, torch.nn.DataParallel): |
| 325 | model_state = model_state_to_cpu(model.module.state_dict()) |
| 326 | else: |
| 327 | model_state = model.state_dict() |
| 328 | return model_state |
nothing calls this directly
no test coverage detected