Reading a Dataset from a local computer

Hello guys, Recently I have started attending the Deep Learning Tutorials. After learning the basics, I want to apply it to a dataset which is saved in the D-Drive of my local computer. I am using google colab.

So I set my path like this:

path = ‘D:\Machine Learning\Classification\101_ObjectCategories’

But when I type:
It throws an error called ‘str object has no attribute ls’

Please help me with this issue.

Thank You.

You need to upload it to Colab. It’s on its own server and has no connection to your local hard drive unless you upload it to their server.

1 Like

@muellerzr Thank you so much for replying. I uploaded the dataset on google drive. Now i can get it from colab. Is this okay? Or is there a way of directly uploading to Colab?

Thank You in Advance.

Hi Yash

Colab is just a computer so a program running on the colab computer could copy data from your computer but the data will not be there when you exit colab at the end of the day. So the most practical solution is to use your free 15GB of Google Drive as the mechanism to provide data to your free colab computer. All your temporary datasets can be on the colab computer.

Regards Conwyn

1 Like


Thank you for replying so quickly. I hope I will be able to unzip the folder in Colab and work. Thank you for you answer. Is there a way of acepting your answer? This is my first question on the forum so i dunno.
Also, If I stutter somewhere I will continue this thread.

Thank you and take care.