Reshape cannot infer the missing input size for an empty tensor unless all specified input sizes are
生活随笔
收集整理的這篇文章主要介紹了
Reshape cannot infer the missing input size for an empty tensor unless all specified input sizes are
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
情況:就是本來你的 tensor 是有東西的,代碼也應該是沒問題的,百度無果,debug無果。
原因:突然發現了這一行 failed to allocate 202.56M (212402176 bytes) from device: CUDA_ERROR_OUT_OF_MEMORY: out of memory
然后用 nvidia-smi 查看,發現確實是服務器上GPU的內存被大家占了,導致你的 tensor 沒有位置放,所以錯誤提示 empty tensor
解決辦法:就是看看哪個GPU內存夠,就去哪個上面運行。
關于GPU情況的查看和指定,參見我之前的文章 tensorflow–GPU
總結
以上是生活随笔為你收集整理的Reshape cannot infer the missing input size for an empty tensor unless all specified input sizes are的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 【LeetCode】3月28日打卡-Da
- 下一篇: RemoveError: ‘setupt