MCPcopy Index your code
hub / github.com/FoundationVision/ByteTrack / fuse_model

Function fuse_model

yolox/utils/model_utils.py:66–74  ·  view source on GitHub ↗
(model)

Source from the content-addressed store, hash-verified

64
65
66def fuse_model(model):
67 from yolox.models.network_blocks import BaseConv
68
69 for m in model.modules():
70 if type(m) is BaseConv and hasattr(m, "bn"):
71 m.conv = fuse_conv_and_bn(m.conv, m.bn) # update conv
72 delattr(m, "bn") # remove batchnorm
73 m.forward = m.fuseforward # update forward
74 return model
75
76
77def replace_module(module, replaced_module_type, new_module_type, replace_func=None):

Callers 5

mainFunction · 0.90
mainFunction · 0.90
mainFunction · 0.90
mainFunction · 0.90
mainFunction · 0.90

Calls 1

fuse_conv_and_bnFunction · 0.85

Tested by

no test coverage detected