TensorFlow 常見錯誤與解決方法——長期不定時更新


1. TypeError: Cannot interpret feed_dict key as Tensor: Can not convert a builtin_function_or_method into a Tensor.
  • 錯誤代碼如下:
_, summary, train_cost = sess.run([optimizer, merged, loss], feed_dict={ X: real_data, Y: real_label, is_training: True, iter: epoch})
View Code
  • 錯誤原因及解決方法

沒有定義 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」! 
seniusen


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM