
错误集锦
ShaoDu
了解图像处理,目标检测,目前专注Java相关领域
展开
-
python中字典保存成.mat文件时出现IndexError: invalid index to scalar variable
将字典保存成mat格式一般操作:import scipy.io as scioscio.savemat(dataNew,{"frames":frames_dict})这里的上面即便frames_dict是字典格式,再保存成mat时,第二个参数必须以上面这种格式书写。倘若直接:scio.savemat(dataNew,frames_dict),就会出现该错误...原创 2019-04-27 22:18:01 · 14547 阅读 · 0 评论 -
ValueError: decode_predictions:a 2D array of shape (samples,, 1000)). Found array with shape: (1, 7)
这是我使用resnet50.h5进行训练新的模型时出现的问题,而出现此问题的原因是模型的resnet的类别是1000类。而此时的类别是7类,类别不匹配造成的,所以解决方法是:在加载模型权重是设置by_name=True,意思是允许进行fine-tuning微调model.load_weights(weight_path,by_name=True)...原创 2019-06-08 17:35:28 · 4599 阅读 · 3 评论 -
Error: The file/path provided (app) does not appear to exist. Please verify the path is correct.
对于这种在flask中在运行app.py时出现的错误,首先该错误的原因时app.py中导入的包文件有错误,或者该包文件下链接的其他py文件有错误,如果坚持使用pycharm的话很难发现错误的根本原因所在,所以此时推荐的解决方法是使用命令窗口进行运行测试,因为在命令窗口中运行时所有链接的包下出现的错误都会出现,就可以通过相应的错误找到相应的路径进行解决。...原创 2019-07-06 10:18:57 · 2345 阅读 · 0 评论 -
ValueError: Variable resnet_v1_101/conv1/weights already exists, disallowed. Did you mean...
ValueError: Variable resnet_v1_101/conv1/weights already exists, disallowed. Did you mean to set reuse=True in VarScope? Originally defined at...这个问题是已经启动了模型,再进行重载出现的错误所以,解决方法:在每次模型重新加载的时候删除可能已经加载的...原创 2019-07-30 16:46:34 · 1597 阅读 · 2 评论 -
NotFoundError (see above for traceback): Key scale1/beta not found in checkpoint
NotFoundError (see above for traceback): Key scale1/beta not found in checkpoint [[Node: save/RestoreV2_2 = RestoreV2[dtypes=[DT_FLOAT], _device="/job:localhost/replica:0/task:0/cpu:0"](_arg_save/Co...原创 2019-07-30 16:53:11 · 822 阅读 · 0 评论 -
InvalidArgumentError (see above for traceback): NodeDef mentions attr 'identical_element_shapes' not
When I run real_time_counting.py,this error occurred: 2019-08-11 14:15:08.854541: E tensorflow/core/common_runtime/executor.cc:644] Executor failed to create kernel. Invalid argument: NodeDef ...原创 2019-08-11 20:12:30 · 1364 阅读 · 0 评论 -
TypeError: ('Keyword argument not understood:', 'interpolation')
在使用keras进行load_model加载模型时,出现"TypeError: ('Keyword argument not understood:', 'interpolation')"而出现此问题的原因是:keras与调用的tensorflow版本不一致产生,对于我的tensorflow=1.14版本,对应的版本应该是keras==2.2.4及以上参考:https://stackoverf...原创 2019-10-07 10:53:35 · 10622 阅读 · 4 评论