Reputation: 61
I would like to use Google Colab to accelerate the process of calculation of my deep learning model. However, I cannot run the model directly from the .ipynb file in the Google Colaboratory, since it has several .py functions written separately and then the main program will call them together in another .py file.
One of the proposed solutions consisted of following three steps:
I have done steps 1
and 2
successfully, however, I still cannot run the third step. And I am getting the following error: python3: can't open file 'model_trainer.py': [Errno 2] No such file or directory.
Does anyone have a solution to this problem?
I look forward to hearing from you.
Upvotes: 5
Views: 8297
Reputation: 1
I have the same problem.
you can use !pwd
to see the current dictionary and cd
to change the dictionary which your python files locate.
If you wanna run the .py
file, you can just use !python example.py
to run.
Upvotes: 0
Reputation: 1000
When you clone a GitHub repo in Colab, it will create a directory for that repo.
To run your python script, you must use %cd
before using !python
.
Upvotes: 13