forked from mindspore-Ecosystem/mindspore
!13885 fix quant _partial_init example
From: @yuchaojie Reviewed-by: @zhoufeng54,@kisnwang Signed-off-by: @zhoufeng54
This commit is contained in:
commit
9ac13fb8e2
|
@ -112,6 +112,9 @@ def _partial_init(cls_or_self, **kwargs):
|
|||
constructor arguments, but different instances.
|
||||
|
||||
Examples:
|
||||
>>> class Foo:
|
||||
>>> def __init__(self, a, b, answer):
|
||||
>>> pass
|
||||
>>> Foo.partial_init = classmethod(_partial_init)
|
||||
>>> foo_builder = Foo.partial_init(a=3, b=4).partial_init(answer=42)
|
||||
>>> foo_instance1 = foo_builder()
|
||||
|
|
Loading…
Reference in New Issue