MCPcopy Create free account
hub / github.com/FoundationVision/ByteTrack / copy_attr

Function copy_attr

yolox/utils/ema.py:21–27  ·  view source on GitHub ↗
(a, b, include=(), exclude=())

Source from the content-addressed store, hash-verified

19
20
21def copy_attr(a, b, include=(), exclude=()):
22 # Copy attributes from b to a, options to only include [...] and to exclude [...]
23 for k, v in b.__dict__.items():
24 if (len(include) and k not in include) or k.startswith("_") or k in exclude:
25 continue
26 else:
27 setattr(a, k, v)
28
29
30class ModelEMA:

Callers 1

update_attrMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected