BaseModule¶
- class pybind11_ke.module.BaseModule(*args: Any, **kwargs: Any)[源代码]¶
继承自
torch.nn.Module,并且封装了一些常用功能,如加载和保存模型。- __weakref__¶
list of weak references to the object (if defined)
- get_parameters(mode: str = 'numpy', param_dict: dict[str, Any] | None = None) dict[str, numpy.ndarray] | dict[str, list] | dict[str, torch.Tensor][源代码]¶
获得模型权重。
- pi_const: torch.nn.parameter.Parameter¶
常数 pi
- zero_const: torch.nn.parameter.Parameter¶
常数 0