Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ResourceExhaustedError in Python when allocating tensor

This problem exists when I try to run the train.py from keras-mplecules-master ( https://github.com/maxhodak/keras-molecules ). It appears to be my graphic cards don't have enough memory. Is there any way to solve this? Thank You. My graphic card is a GTX970 with 4GB ram. Thanks.

Error message :

    ResourceExhaustedError (see above for traceback): OOM when allocating tensor with shape[600,120,1503]

I have read a very similar problem Tensorflow Deep MNIST: Resource exhausted: OOM when allocating tensor with shape[10000,32,28,28] but I still don't know how should I change my code. I am new to ubuntu, so please be specific if possible. Thank You.

like image 412
T jeffrey Avatar asked Oct 21 '25 06:10

T jeffrey


1 Answers

The problem have been solve. This is a problem related to the RAM usage. It can be solved by limiting the batch_size thus less RAM is used at the same time and the problem will be solved.

like image 104
T jeffrey Avatar answered Oct 23 '25 18:10

T jeffrey



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!