MCPcopy Create free account
hub / github.com/cxzhou95/XLSR / fuse_model

Method fuse_model

model.py:168–175  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

166 return res
167
168 def fuse_model(self):
169 for m in self.modules():
170 if type(m) == ConvRelu:
171 # print("fuse conv and relu in ConvRelu")
172 torch.quantization.fuse_modules(m, ['conv', 'relu'], inplace=True)
173 if type(m) == Gblock:
174 # print("fuse conv and relu in Gblock")
175 torch.quantization.fuse_modules(m, ['conv0', 'relu'], inplace=True)
176
177
178if __name__ == '__main__':

Callers 1

QAT.pyFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected