1. 程式人生 > >MxNet 錯誤--視訊記憶體不足(Failed to find any forward convolution algorithm.|| Out of memory)

MxNet 錯誤--視訊記憶體不足(Failed to find any forward convolution algorithm.|| Out of memory)

前提:

用144*128 的資料訓練mobileNet原始模型。訓練的時候超引數的不同,出現的幾個錯誤。

裝置:

GTX 1080 8G視訊記憶體。

錯誤出現情況:

1.out of memory

超引數設定:

batch_size=256  gpu=0,1

或者

batch_size=128  gpu=0,1


2.Failed to find any forward convolution algorithm

引數設定:

batch_size=256  gpu=0

原因查詢:

網上百度了一下,發現並沒有相應的解釋,如果要追求根本的話應該看一下原始碼,那就是cudnn_convolution-inl.h檔案和記憶體管理檔案了,有點長了,等有時間再仔細讀一下。

問題定位排查:

猜想是視訊記憶體不足,因為發現不同的超引數,錯誤不一樣,或者沒有問題了。所以應該是視訊記憶體不足,在設定batch_size=128  gpu=0,1的時候也看了一下顯示卡的執行情況,果然是11G/16G的佔用,所以反推應該是視訊記憶體不夠。

解決辦法:

1.減少batch_size。 

2.增加gpu數量。

3.縮小模型。