tensorflow - RuntimeError:无法从输入流中解析字典
问题描述
我对cntk完全陌生。我最近使用 GeForce 940MX GPU 在我的电脑(Windows 10,i5-7200U CPU)上安装了 cntk 2.7(GPU 版本)。我正在尝试设置 cntk 和以下链接中提供的更快的 rcnn 对象检测示例 https://docs.microsoft.com/en-us/cognitive-toolkit/object-detection-using-faster-r-cnn
我正在尝试运行玩具示例。
在 Examples/Image/Detection/FastRCNN 文件夹中运行 install_data_and_model.py 后
我运行 run_faster_rcnn.py Examples/Image/Detection/FasterRCNN 文件夹
我收到以下错误:
Selected GPU[0] GeForce 940MX as the process wide default device.
About to throw exception 'Failed to parse Dictionary from the input stream.'
Traceback (most recent call last):
File "run_faster_rcnn.py", line 34, in
trained_model = train_faster_rcnn(cfg)
File "C:\Users\HP-PC\Anaconda3\Lib\site-packages\cntk\Examples\Image\Detection\FasterRCNN\FasterRCNN_train.py", line 291, in train_faster_rcnn
eval_model = train_faster_rcnn_e2e(cfg)
File "C:\Users\HP-PC\Anaconda3\Lib\site-packages\cntk\Examples\Image\Detection\FasterRCNN\FasterRCNN_train.py", line 314, in train_faster_rcnn_e2e
loss, pred_error = create_faster_rcnn_model(image_input, roi_input, dims_node, cfg)
File "C:\Users\HP-PC\Anaconda3\Lib\site-packages\cntk\Examples\Image\Detection\FasterRCNN\FasterRCNN_train.py", line 177, in create_faster_rcnn_model
base_model = load_model(cfg['BASE_MODEL_PATH'])
File "C:\Users\HP-PC\Anaconda3\lib\site-packages\cntk\internal\swig_helper.py", line 69, in wrapper
result = f(*args, **kwds)
File "C:\Users\HP-PC\Anaconda3\lib\site-packages\cntk\ops\functions.py", line 1721, in load_model
return Function.load(model, device, format)
File "C:\Users\HP-PC\Anaconda3\lib\site-packages\cntk\internal\swig_helper.py", line 69, in wrapper
result = f(*args, **kwds)
File "C:\Users\HP-PC\Anaconda3\lib\site-packages\cntk\ops\functions.py", line 1635, in load
return cntk_py.Function.load(str(model), device, format.value)
RuntimeError: Failed to parse Dictionary from the input stream.
[CALL STACK]
> CNTK::Internal:: UseSparseGradientAggregationInDataParallelSGD
- CNTK::operator>>
- CNTK::Function:: Load
- PyInit__cntk_py (x2)
- PyCFunction_Call
- PyEval_GetFuncDesc
- PyEval_EvalFrameEx (x2)
- PyFunction_SetAnnotations
- PyObject_Call
- PyEval_GetFuncDesc
- PyEval_EvalFrameEx (x2)
- PyEval_GetFuncDesc (x2)
有人可以帮我解决问题的全部内容吗?
解决方案
保存最后一个模型时关闭cntk时总是发生此错误,因此模型文件中断
推荐阅读
- wso2 - OIDC 的私钥 JWT 客户端身份验证:找不到 client_id 的有效 OAuth 客户端
- javascript - 如何在图表的中心添加文本 js 圆环图
- python - 训练 keras 开始时挂起
- php - 如何使用 reactjs 和 php 将图像上传到数据库?
- laravel - [Route: verify.verify] [URI: {locale}/email/verify/{id}/{hash}] 缺少必需的参数
- vb.net - 使用 BinaryReader 读取不会更新 TextBox
- python-3.x - 模块“tensorflow”没有属性“random_uniform”
- appstore-approval - 苹果登录被拒绝
- react-native - 如何在本机反应中使用日期和时间选择器
- java - 为 tictactoe 找到 bestmove 的 minimax 算法