Reputation: 1
I've been training a model using just tensorflow on my GPU with the help of tf.device()
, it was working fine until now. I am making another NN model in Keras and while using model.fit
it is giving me OOM error.
Can anyone guide me how to solve this issue?
Upvotes: 0
Views: 1676
Reputation: 1
It is solved now. I switched to google.colab for a while, but after sometime, i used it on my device and it ran perfectly, i did cleaned up some files in between, and was experimenting with my GPU, i guess something in that triggered the solution. Thank You anyway.
Upvotes: 0
Reputation: 382
OOM(Out of memory) error comes when your model want to use more memory then available memory. Check your GPU memory whether memory is occupied by some process before training. In nvidia GPU you can check with memory by command nvidia-smi
in cmd before starting the training.
If no memory is occupied by any process or model before starting of training and you still getting OOM error then you have to optimize your model by Changing batch size or reducing data size or image size or by reducing trainable parameters of model(number of neurons).
Upvotes: 1