megengine.module.Module.tensors

Module.tensors(recursive=True, **kwargs)[源代码]

Returns an iterable for the Tensor of the module.

参数

recursive (bool) – If True, returns all Tensor within this module, else only returns Tensor that are direct attributes of this module.

返回类型

Iterable[Parameter]