打开微信,使用扫一扫进入页面后,点击右上角菜单,
点击“发送给朋友”或“分享到朋友圈”完成分享
运行 eval.py 工具 量化ssd 模型 出现如下错误:
(pytorch) root@fae-t4:/opt/cambricon# python $CATCH_HOME/examples/online/ssd/eval.py --voc_root $VOC2007_PATH_PYTORCH --quantization true --image_number 1 --quantized_mode 1 --quantized_model_path $TORCH_HOME/int8/checkpoints
CNML: 7.7.0 a414883
CNRT: 4.6.0 e158c88
/opt/cambricon/pytorch/src/catch/venv/pytorch/lib/python3.5/site-packages/torchvision/models/ _detection/ssd/ s/modules/l2norm.py:18: UserWarning: nn.init.constant is now deprecated in favor of nn.init.constant_.
init.constant(self.weight,self.gamma)
/opt/cambricon/pytorch/src/catch/venv/pytorch/lib/python3.5/site-packages/torch/hub.py:463: UserWarning: TORCH_MODEL_ZOO is deprecated, please use env TORCH_HOME instead
warnings.warn('TORCH_MODEL_ZOO is deprecated, please use env TORCH_HOME instead')
Finished loading model!
/opt/cambricon/pytorch/src/catch/venv/pytorch/lib/python3.5/site-packages/torch_mlu/core/quantized/modules/l2norm.py:25: UserWarning: nn.init.constant is now deprecated in favor of nn.init.constant_.
init.constant(self.weight, self.gamma)
Detecting s: 100%|######################################################################################################################################################################################| 1/1 [00:17<00:00, 17.32s/it]
Traceback (most recent call last):
File "/opt/cambricon/pytorch/src/catch/examples/online/ssd/eval.py", line 646, in <module>
300, thresh=args.confidence_threshold,core_number = args.core_number)
File "/opt/cambricon/pytorch/src/catch/examples/online/ssd/eval.py", line 550, in test_net
torch.save(checkpoint, '{}/ssd300_mAP_77.43_v2.pth'.format(args.quantized_model_path))
File "/opt/cambricon/pytorch/src/catch/venv/pytorch/lib/python3.5/site-packages/torch/serialization.py", line 260, in save
return _with_file_like(f, "wb", lambda f: _save(obj, f, pickle_module, pickle_protocol))
File "/opt/cambricon/pytorch/src/catch/venv/pytorch/lib/python3.5/site-packages/torch/serialization.py", line 183, in _with_file_like
f = open(f, mode)
FileNotFoundError: [Errno 2] No such file or directory: '/opt/cambricon/models/pytorch_models/int8/checkpoints/ssd300_mAP_77.43_v2.pth'
操作步骤:
python $CATCH_HOME/examples/online/ssd/eval.py --voc_root $VOC2007_PATH_PYTORCH --quantization true --image_number 100 --quantized_mode 1 --quantized_model_path $TORCH_HOME/int8/checkpoint
热门帖子
精华帖子