A function wrapper for launching model training according to cfg. Because we need different eval_hook in runner. Should be deprecated in the future.
(model,
dataset,
cfg,
distributed=False,
validate=False,
timestamp=None,
meta=None)
| 36 | |
| 37 | |
| 38 | def train_model(model, |
| 39 | dataset, |
| 40 | cfg, |
| 41 | distributed=False, |
| 42 | validate=False, |
| 43 | timestamp=None, |
| 44 | meta=None): |
| 45 | """A function wrapper for launching model training according to cfg. |
| 46 | |
| 47 | Because we need different eval_hook in runner. Should be deprecated in the |
| 48 | future. |
| 49 | """ |
| 50 | if cfg.model.type in ['EncoderDecoder3D']: |
| 51 | train_segmentor( |
| 52 | model, |
| 53 | dataset, |
| 54 | cfg, |
| 55 | distributed=distributed, |
| 56 | validate=validate, |
| 57 | timestamp=timestamp, |
| 58 | meta=meta) |
| 59 | else: |
| 60 | train_detector( |
| 61 | model, |
| 62 | dataset, |
| 63 | cfg, |
| 64 | distributed=distributed, |
| 65 | validate=validate, |
| 66 | timestamp=timestamp, |
| 67 | meta=meta) |
nothing calls this directly
no outgoing calls
no test coverage detected