MCPcopy Create free account
hub / github.com/OpenDriveLab/OccNet / train_model

Function train_model

projects/mmdet3d_plugin/bevformer/apis/train.py:38–67  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

36
37
38def 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)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected