megengine.traced_module.trace_module

trace_module(mod, *args, **kwargs)[源代码]

Traces module mod and returns corresponding TracedModule.

参数
  • mod (Module) – the module will be converted to TracedModule.

  • args (Tuple[Any]) – the positional arguments passed to forward method of mod.

  • kwargs (Dict[str, Any]) – the keyword arguments passed to forward method of mod.

返回类型

TracedModule