我是cntk的新手。我最近在装有GeForce 940MX GPU的电脑上安装了cntk 2.7(GPU版本((Windows 10,i5-7200U CPU(。我正在尝试设置 cntk 和下面链接中提供的更快的 rcnn 对象检测示例https://learn.microsoft.com/en-us/cognitive-toolkit/object-detection-using-faster-r-cnn
我正在尝试运行玩具示例。
在示例/图像/检测/快速RCNN文件夹中运行install_data_and_model.py后
我运行run_faster_rcnn.py示例/图像/检测/更快的RCNN文件夹
我收到以下错误:
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:UsersHP-PCAnaconda3Libsite-packagescntkExamplesImageDetectionFasterRCNNFasterRCNN_train.py", line 291, in train_faster_rcnn
eval_model = train_faster_rcnn_e2e(cfg)
File "C:UsersHP-PCAnaconda3Libsite-packagescntkExamplesImageDetectionFasterRCNNFasterRCNN_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:UsersHP-PCAnaconda3Libsite-packagescntkExamplesImageDetectionFasterRCNNFasterRCNN_train.py", line 177, in create_faster_rcnn_model
base_model = load_model(cfg['BASE_MODEL_PATH'])
File "C:UsersHP-PCAnaconda3libsite-packagescntkinternalswig_helper.py", line 69, in wrapper
result = f(*args, **kwds)
File "C:UsersHP-PCAnaconda3libsite-packagescntkopsfunctions.py", line 1721, in load_model
return Function.load(model, device, format)
File "C:UsersHP-PCAnaconda3libsite-packagescntkinternalswig_helper.py", line 69, in wrapper
result = f(*args, **kwds)
File "C:UsersHP-PCAnaconda3libsite-packagescntkopsfunctions.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时,总是会发生此错误,因此模型文件中断