首页 > 解决方案 > 使用从磁盘加载的 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

知道如何克服这个问题吗?

标签: deep-learningconv-neural-network

解决方案


显然,我只是没有在我的系统上安装 CUDA。做到了,现在它正在工作!


推荐阅读