Unwraps a model from its DataParallel wrapper if it is wrapped.
(model)
| 22 | HF_CONFIG_NAME = 'open_clip_config.json' |
| 23 | |
| 24 | def unwrap_model(model): |
| 25 | """ |
| 26 | Unwraps a model from its DataParallel wrapper if it is wrapped. |
| 27 | """ |
| 28 | return model.module if hasattr(model, 'module') else model |
| 29 | |
| 30 | def freeze_batch_norm_2d(module, module_match={}, name=''): |
| 31 | """ |
nothing calls this directly
no outgoing calls
no test coverage detected