Hi all
Could you help me to identify why my model.fit runs too long. 15 epochs run in 4+ hours in colab.
I’m not sure if it’s ok.
Thanks
1 Like
Is the runtime set to GPU?
Runtime > Change runtime type

Please click my name and message your notebook as an attachment.
Here are a couple of tips to make the training faster:
- Change network architecture. Remember that the number of parameters of Conv2D layers orders of magnitude lower than the dense layer that follows a flatten layer.
- Leave the batch size at the default value i.e. 32 when possible. When GPU doesn’t have enough memory for training the dataset i.e. out of memory error is raised, reduce batch size to smaller values.
- Read this topic.
- Although time per epoch is unaffected by choice of learning rate, convergence of the model is influenced by this parameter. Values lower than 1e-3 better be tested on the dataset before using them as your final choice. Consider taking
deep learning specializationto learn more about tuning the learning rate. - Change the GPU allocated for you if you find the performance unacceptable. Execute
!nvidia-smion a notebook cell to find the compute capability of the GPU.
1 Like
Thanks for recomendations
