原文:tensorflow報錯 tensorflow Resource exhausted: OOM when allocating tensor with shape

在使用tensorflow的object detection時,出現以下報錯 tensorflow Resource exhausted: OOM when allocating tensor with shape 可能的解決方法: 減小訓練的batch大小 ...

2018-08-28 16:32 0 951 推薦指數:

查看詳情

''tensorflow.python.framework.errors_impl.ResourceExhaustedError: OOM when allocating tensor with shape[?]'' 錯誤分析

這是tensorflow 一個經常性錯誤,錯誤的原因在於:顯卡內存不夠。 解決方法就是降低顯卡的使用內存,途徑有以下幾種措施: 1 減少Batch 的大小 2 分析錯誤的位置,在哪一層出現顯卡不夠,比如在全連接層出現的,則降低全連接層的維度,把2048改成1042啥的 3 增加pool 層 ...

Fri Jun 22 04:34:00 CST 2018 0 4872
tensorflow ResourceExhaustedError (see above for traceback): OOM when allocating tensor with shape[256,256,15,15] and type float on 報錯(顯存不夠報錯

出現這個的原因是gpu顯存不夠導致的,一般是我們設置了程序根據需求增長導致的 這里,我們設置 allow_growth=False 就可以控制顯存使用的增長,從而控制顯存的使用,而不會程序運行一半報錯。 這種情況是建立在我們的顯存比較小的情況下使用的策略,如果說我們顯存夠大則不 ...

Fri Nov 08 02:50:00 CST 2019 0 351
 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM