TensorFlow 常见错误与解决方法——长期不定时更新
1. TypeError: Cannot interpret feed_dict key as Tensor: Can not convert a builtin_function_or_method into a Tensor.
- 错误代码如下:
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
_, summary, train_cost = sess.run([optimizer, merged, loss], feed_dict={ X: real_data, Y: real_label, is_training: True, iter: epoch})
- 错误原因及解决方法
没有定义 iter 这个占位符,因此 feed_dict 的键值无法解析而出错。
2. could not create cudnn handle: CUDNN_STATUS_INTERNAL_ERROR
- 详细错误信息如下:
E tensorflow/stream_executor/cuda/cuda_dnn.cc:385] could not create cudnn handle: CUDNN_STATUS_INTERNAL_ERROR E tensorflow/stream_executor/cuda/cuda_dnn.cc:352] could not destroy cudnn handle: CUDNN_STATUS_BAD_PARAM F tensorflow/core/kernels/conv_ops.cc:605] Check failed: stream->parent()->GetConvolveAlgorithms(&algorithms)
- 错误原因及解决方法
删除家目录下面的隐藏文件夹 .nv 即可。sudo rm -f ~/.nv/
获取更多精彩,请关注「seniusen」!