MCPcopy Create free account
hub / github.com/PeizeSun/SparseR-CNN / add_export_config

Function add_export_config

detectron2/export/api.py:25–40  ·  view source on GitHub ↗

Args: cfg (CfgNode): a detectron2 config Returns: CfgNode: an updated config with new options that will be used by :class:`Caffe2Tracer`.

(cfg)

Source from the content-addressed store, hash-verified

23
24
25def add_export_config(cfg):
26 """
27 Args:
28 cfg (CfgNode): a detectron2 config
29
30 Returns:
31 CfgNode: an updated config with new options that will be used
32 by :class:`Caffe2Tracer`.
33 """
34 is_frozen = cfg.is_frozen()
35 cfg.defrost()
36 cfg.EXPORT_CAFFE2 = CN()
37 cfg.EXPORT_CAFFE2.USE_HEATMAP_MAX_KEYPOINT = False
38 if is_frozen:
39 cfg.freeze()
40 return cfg
41
42
43class Caffe2Tracer:

Callers 3

setup_cfgFunction · 0.90
_test_modelMethod · 0.90
__init__Method · 0.85

Calls 1

freezeMethod · 0.45

Tested by 1

_test_modelMethod · 0.72