1. 程式人生 > >Python報錯:00M: When allocating tensor with shape.

Python報錯:00M: When allocating tensor with shape.

OOM : When allocating tensor with shape.

報錯原因:顯示卡記憶體不夠;

解決辦法:①、首先檢視顯示卡佔用情況,有可能是顯示卡記憶體被別的程式佔用沒有退出,可以後臺檢視;

                  ②、排除第一種情況之後,考慮:bath_size可能設定過大,可以適當調小。