代码拉取完成,页面将自动刷新
name | about | labels |
---|---|---|
Bug Report | Use this template for reporting a bug | kind/bug |
Hardware Environment(Ascend
/GPU
/CPU
):
-- GPU
Software Environment:
-- MindSpore version (source or binary): 1.5.1
-- Python version (e.g., Python 3.7.5): 3.7.6
-- OS platform and distribution (e.g., Linux Ubuntu 16.04):
-- GCC/Compiler version (if compiled from source): None
import numpy as np
import mindspore
from mindspore import Tensor, save_checkpoint, load_checkpoint
if __name__ == "__main__":
data = Tensor(np.random.uniform(0, 255, (1, 2)), mindspore.uint8)
save_obj = [{
"name": "test_data",
"data": data
}]
test_save_path = "test_save_load.ckpt"
save_checkpoint(save_obj, test_save_path)
param_dict = load_checkpoint(test_save_path)
print(param_dict["test_data"].dtype)
mindspore.uint8
to checkpoint file.Failed to load the checkpoint file.
Success to Load checkpoint file, and printUInt8
.
[ERROR] ME(38583:139942186227520,MainProcess):2021-11-08-12:08:58.359.733 [mindspore/train/serialization.py:467] Failed to load the checkpoint file `XXX/test_save_load.ckpt`.
Traceback (most recent call last):
File "XXX/mindspore/train/serialization.py", line 440, in load_checkpoint
np_type = tensor_to_np_type[data_type]
KeyError: 'UInt8'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "XXX/test_save_load_ckpt.py", line 15, in <module>
param_dict = load_checkpoint(test_save_path)
File "XXX/mindspore/train/serialization.py", line 468, in load_checkpoint
raise RuntimeError(e.__str__())
RuntimeError: 'UInt8'
NA
@changzherui 帮看看这个问题,为什么当前没支持来着,支持难度大么
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
登录 后才可以发表评论