Train taking excessively long time

I am using google colab TPU, to train the model. Still after 1-2 hours not even a single epoch is running. what could be the problem

Hey @anukritigarg13, I would request you to use Google Colab GPU and see if it takes less time than what it is taking now.

Hope this helps !
Happy Learning :slight_smile:

I did that…still no result…not even a single batch

Hey @anukritigarg13, can you please share your code by uploading on google drive and sharing the link here ?

Actually I saved the files in .npy and .pkl format which were required for training and then I am uploading them.So how should I send those files

I just want to see your .ipynb notebook or .py file wherever you have written the whole code. Download the notebook in which your are working on google colaboratory …then share it’s link by uploading on google drive that .ipynb notebook.

Infact you can even directly share the link to your notebook from the file menu on google colab.

https://colab.research.google.com/drive/1GsR3S-Y5VQ-NZUlMKvE8CtejIPSP5UiX?usp=sharing

Did you go to change runtime and selected GPU and then saved that ? If no then please do it.
Also why are some cells showing error in your code ? I would request you to follow the steps in the same sequence as done by sir in the videos. It is very difficult to understand you code if it’s not organised.

can you tell how much time one eopch generally takes to run on colab

One epoch generally takes 30-40 mins to run. If your internet connection is a bit slow then it can even take 1 hour for 1 epoch.

Hope this helps !
Happy Learning :slight_smile:

Would you please take a look at both the scripts and tell whether there is some error or not. Actually I used the first ipynb to process and download the files that are to be used during testing. Then I used the second script to train and upload. Could you take a look and tell whether the problem is with code or something else

Here is the link for first script
https://colab.research.google.com/drive/1PyIKVXjSrGTTxVhLIeH8_pdDbMMJMWTo

Link for the second script I already shared

Hey @anukritigarg13, there’s no error as such in your code. It’s just that I would say that first try to keep the values in your code the same as sir has done. As I can see you have removed those words from the vocabulary which have length =1. So hence your vocab size and total words are more than what sir did. First try running on the same values as sir did and see if there’s any error. If you have any doubts you can ask me anytime. Please have a look at this code and see if you are able to get the same outputs as shown in this code :

Hope this helps !
Also please wait for sometime, your code seems correct…training does take sometime…just leave the code running for sometime
Happy Learning :slight_smile:

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.