How to fix ‘_pickle.UnpicklingError: invalid load key, ‘<‘ ‘ error in Pytorch

The problem I encountered when I ran the official code of maskrcnn-benchmark for facebookresearch,which was wrong when loading the pre-training model.

The code runs on a remote server at the school and the graphics card is an NVIDIA P100.

checkpointer = DetectronCheckpointer( cfg, model, optimizer, scheduler, output_dir, save_to_disk) extra_checkpoint_data = checkpointer.load(cfg.MODEL.WEIGHT) arguments.update(extra_checkpoint_data)

I expect to run the code correctly and understand why this is the problem.

原因:The reason about the problem is that the previous download was not finished. So when I deleted the original file and re-downloaded it, the problem was solved.
参数没有办法反序列化,长度小于标准,可能的原因是参数没有下载完整,需要重新下载参数。

参考:https://stackoverflow.com/questions/56391392/how-to-fix-pickle-unpicklingerror-invalid-load-key-error-in-pytorch

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值