Practical-Deep-Learning-Book icon indicating copy to clipboard operation
Practical-Deep-Learning-Book copied to clipboard

Create data dir

Open tbarton16 opened this issue 4 years ago • 5 comments
trafficstars

I get an error when I run the notebook. I cannot write file because this directory './data' does not exist. This pr fixes that. To reproduce the error you can run all the cells of the nb.

Screen Shot 2021-08-19 at 1 10 33 PM

tbarton16 avatar Aug 19 '21 17:08 tbarton16

Thank you @tbarton16! This notebook is particularly heavy as it not only downloads an entire dataset but also processes the data. Additionally, there are many notebooks that use the raw data so ideally, we would expect people to run it on their local machines, such that the data has to be downloaded only once. While running on Colab, we've mentioned instructions Note: In order to run this notebook on Google Colab you need to follow these instructions so that the local data such as the images are available in your Google Drive.

That being said, I do like your idea and would suggest a slight tweak to it - add a check to see if the data directory already exists and if not, then create it. That way the code will work seamlessly on colab and on a local machines. What do you think?

sidgan avatar Aug 19 '21 19:08 sidgan

Yes, I will edit it to check first, thanks for the feedback! I have noticed some other issues

  • there are 2 notebooks for chapter 4 part 1, (here and here) and the more recent one is not the one that comes up first from the textbook.
  • There is an issue where the number of filenames the generator finds is not equal to the number of images in the dataset, so that also raises an error.

I'm sure these errors will be fixed by running locally with photos on google drive, but if it would be helpful to have the pure colab version working seamlessly for colab pro users (like me) I would be happy to fix them and test the changes.

Screen Shot 2021-08-19 at 3 52 10 PM

tbarton16 avatar Aug 19 '21 19:08 tbarton16

Can you explain what you mean by 'does not come up first from the textbook?'

On Thu, Aug 19, 2021 at 12:58 PM Theresa Barton @.***> wrote:

Yes, I will edit it to check first, thanks for the feedback! I have noticed some other issues

I'm sure these errors will be fixed by running locally with photos on google drive, but if it would be helpful to have the pure colab version working seamlessly for colab pro users (like me) I would be happy to fix them and test the changes.

[image: Screen Shot 2021-08-19 at 3 52 10 PM] https://user-images.githubusercontent.com/8050078/130135671-ad9a9a3d-8bb5-4c47-8583-d4847a4cf6ca.png

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/PracticalDL/Practical-Deep-Learning-Book/pull/156#issuecomment-902200863, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA3P6B3Z7FJYMINPTDXHGCTT5VO6JANCNFSM5COU7BFQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .

-- Cheers! Siddha Ganju http://practicaldeeplearning.ai/ http://practicaldeeplearning.ai/

sidgan avatar Aug 20 '21 00:08 sidgan

I think I see what the issue is, the correct and more recent filename should have dashes instead of underscores. I must have missed this in the previous PR.

Thanks for pointing that out!

On Thu, Aug 19, 2021 at 5:23 PM Siddha Ganju @.***> wrote:

Can you explain what you mean by 'does not come up first from the textbook?'

On Thu, Aug 19, 2021 at 12:58 PM Theresa Barton @.***> wrote:

Yes, I will edit it to check first, thanks for the feedback! I have noticed some other issues

I'm sure these errors will be fixed by running locally with photos on google drive, but if it would be helpful to have the pure colab version working seamlessly for colab pro users (like me) I would be happy to fix them and test the changes.

[image: Screen Shot 2021-08-19 at 3 52 10 PM] https://user-images.githubusercontent.com/8050078/130135671-ad9a9a3d-8bb5-4c47-8583-d4847a4cf6ca.png

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/PracticalDL/Practical-Deep-Learning-Book/pull/156#issuecomment-902200863, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA3P6B3Z7FJYMINPTDXHGCTT5VO6JANCNFSM5COU7BFQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .

-- Cheers! Siddha Ganju http://practicaldeeplearning.ai/ http://practicaldeeplearning.ai/

-- Cheers! Siddha Ganju http://practicaldeeplearning.ai/ http://practicaldeeplearning.ai/

sidgan avatar Aug 20 '21 00:08 sidgan

HI, @tbarton16 I've renamed the files correctly so you should be able to access them from within the book now.

Looking forward to your updated PR!

sidgan avatar Aug 23 '21 22:08 sidgan