Out of Memory Error while training model using Keras
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).
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?