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

Function custom_train_model

projects/mmdet3d_plugin/bevformer/apis/train.py:11–35  ·  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,
                eval_model=None,
                meta=None)

Source from the content-addressed store, hash-verified

9from mmdet.apis import train_detector
10
11def custom_train_model(model,
12 dataset,
13 cfg,
14 distributed=False,
15 validate=False,
16 timestamp=None,
17 eval_model=None,
18 meta=None):
19 """A function wrapper for launching model training according to cfg.
20
21 Because we need different eval_hook in runner. Should be deprecated in the
22 future.
23 """
24 if cfg.model.type in ['EncoderDecoder3D']:
25 assert False
26 else:
27 custom_train_detector(
28 model,
29 dataset,
30 cfg,
31 distributed=distributed,
32 validate=validate,
33 timestamp=timestamp,
34 eval_model=eval_model,
35 meta=meta)
36
37
38def train_model(model,

Callers 1

mainFunction · 0.90

Calls 1

custom_train_detectorFunction · 0.85

Tested by

no test coverage detected