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

Function enable_observer

imperative/python/megengine/quantization/quantize.py:301–308  ·  view source on GitHub ↗

r"""Recursively enable ``module`` observer in QATModule through :meth:`~.Module.apply` Args: module: root module to do enable observer recursively.

(module: Module)

Source from the content-addressed store, hash-verified

299
300
301def enable_observer(module: Module):
302 r"""Recursively enable ``module`` observer in QATModule through :meth:`~.Module.apply`
303
304 Args:
305 module: root module to do enable observer recursively.
306 """
307
308 _propagate(module, "set_observer", True)

Callers 2

init_observerFunction · 0.90

Calls 1

_propagateFunction · 0.85

Tested by 2

init_observerFunction · 0.72