deep-learning - 使用从磁盘加载的 CNN 模型进行预测后出错
问题描述
我使用加载了我的 CNN 模型
model = load_model('./model/model.h5')
该模型加载良好(尽管我确实收到警告消息:“使用 dtype 参数调用初始化程序实例,而不是将其传递给构造函数”)
但是,当我尝试使用此模型进行预测时,出现以下错误:
UnknownError: 2 root error(s) found.
(0) Unknown: Failed to get convolution algorithm. This is probably because cuDNN failed to initialize, so try looking to see if a warning log message was printed above.
[[{{node conv2d/Conv2D}}]]
[[dense_2/Softmax/_273]]
(1) Unknown: Failed to get convolution algorithm. This is probably because cuDNN failed to initialize, so try looking to see if a warning log message was printed above.
[[{{node conv2d/Conv2D}}]]
0 successful operations.
0 derived errors ignored
知道如何克服这个问题吗?
解决方案
显然,我只是没有在我的系统上安装 CUDA。做到了,现在它正在工作!
推荐阅读
- meteor - Meteor 重置后 Meteor 的 ServiceConfiguration 损坏
- angular - 在 tsconfig.json 中保存时编译对新文件的工作方式与对现有文件的工作方式不同
- laravel - 仅在 Laravel 中打开模式时加载图像
- angular - Angular:使用另一个组件打开 sidenav,错误类型错误:无法读取未定义的属性“切换”
- arrays - 如何在 Laravel 中验证日期数组
- r - 如何使图形的轴跳过固定值(ggplot2)
- gitlab-ci - 如何将 Allure 报告导出到 gitlab ci 作业中的工件?
- hbase - 为什么要同时刷新 HBase 中的所有 MemStore?
- python - Python 多处理不是按项目执行,而是按字符执行
- javascript - React/Redux 前端和 Node.js 后端之间的 CORS 问题