#14 模型文件解析的问题

Closed
created 3 years ago by mouxiaofeng · 2 comments
13B的模型文件解压后大约有512个小的模型文件,利用“from mindspore import load_checkpoint”可以加载单个模型文件,但是第84和第327个模型文件解析失败,提示如下: [ERROR] ME(20:140421539389568,MainProcess):2021-05-08-11:09:37.435.956 [mindspore/train/serialization.py:280] Failed to read the checkpoint file `data/filerted_84.ckpt`, please check the correct of the file. Traceback (most recent call last): File "/usr/local/python-3.7.5/lib/python3.7/site-packages/mindspore/train/serialization.py", line 278, in load_checkpoint checkpoint_list.ParseFromString(pb_content) File "/usr/local/python-3.7.5/lib/python3.7/site-packages/google/protobuf/message.py", line 199, in ParseFromString return self.MergeFromString(serialized) File "/usr/local/python-3.7.5/lib/python3.7/site-packages/google/protobuf/internal/python_message.py", line 1145, in MergeFromString if self._InternalParse(serialized, 0, length) != length: File "/usr/local/python-3.7.5/lib/python3.7/site-packages/google/protobuf/internal/python_message.py", line 1195, in InternalParse raise message_mod.DecodeError('Field number 0 is illegal.') google.protobuf.message.DecodeError: Field number 0 is illegal. 这是为什么呢? 我用的mindspore版本是:docker 1.2.0的cpu版本。
taoht commented 3 years ago
Owner
在上传的第84个模型文件上load校验是没有问题的,首先根据上传的MD5校验你下载文件的正确性,谢谢。
taoht commented 3 years ago
Owner
请确认使用加载模型:from mindspore.train.serialization import load_checkpoint
taoht closed this issue 3 years ago
Sign in to join this conversation.
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.