MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / disable_quantize

Method disable_quantize

imperative/python/megengine/module/module.py:417–425  ·  view source on GitHub ↗

r"""Sets ``module``'s ``quantize_disabled`` attribute and return ``module``. Could be used as a decorator.

(self, value=True)

Source from the content-addressed store, hash-verified

415 self.train(False)
416
417 def disable_quantize(self, value=True):
418 r"""Sets ``module``'s ``quantize_disabled`` attribute and return ``module``.
419 Could be used as a decorator.
420 """
421
422 def fn(module: Module) -> None:
423 module.quantize_disabled = value
424
425 self.apply(fn)
426
427 @deprecated(version="1.0")
428 def replace_param(

Callers 1

__init__Method · 0.80

Calls 1

applyMethod · 0.95

Tested by 1

__init__Method · 0.64