doc: update load

This commit is contained in:
lzhengning 2021-03-01 14:52:33 +08:00
parent 4db2dcdaa1
commit e12e06b9cd
1 changed files with 2 additions and 0 deletions

View File

@ -932,6 +932,8 @@ class Module:
>>> net.save('net.pkl') >>> net.save('net.pkl')
>>> net.load('net.pkl') >>> net.load('net.pkl')
This method also support loading a state dict from a pytorch .pth file.
.. note:: .. note::
当载入的参数与模型定义不一致时, jittor 会输出错误信息, 但是不会抛出异常. 当载入的参数与模型定义不一致时, jittor 会输出错误信息, 但是不会抛出异常.
若载入参数出现模型定义中没有的参数名, 则会输出如下信息, 并忽略此参数: 若载入参数出现模型定义中没有的参数名, 则会输出如下信息, 并忽略此参数: