原文:【tf.keras】Resource exhausted: OOM when allocating tensor with shape [9216,4096] and type float on /job:localhost/replica:0/task:0/device:GPU:0 by allocator GPU_0_bfc

運行以下類似代碼: 最后會報錯: 解決辦法: 如: 詳細報錯如下: References Keras解決OOM超內存問題 silent th Keras 循環訓練模型跑數據時內存泄漏的問題解決辦法 jemmie w ...

2019-06-04 14:21 0 3622 推薦指數:

查看詳情

OOM when allocating tensor of shape [] and type float [[node conv2d_224/kernel/Initializer/random_uniform/min (defined at ./intances/utils.py:19) ]]

當你們在用模型加載,tensorflow-gpu預測的時候,有沒有出現這樣的錯誤?? 經過網上的資料查閱,更多的解釋是GPU的顯存不足造成的,於是乎,我查看了一下GPU顯存:nvidia-smi 不看不知道,一看確實是那么回事:tensorflow-gpu執行默認將GPU顯存占滿,官 ...

Wed May 29 19:34:00 CST 2019 0 757
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