2

I am following along an image classification tutorial from tensorflow from the following link: https://www.tensorflow.org/tutorials/images/classification.

I have tried following along and when I reach the lines

image_count = len(list(data_dir.glob('*/*.jpg')))

and

print(image_count)

and run them on my laptop, the number that is printed is 492 instead of 3670. I have not modified the tutorial code in any way. Additionally, when I run the code, before the number is printed, I receive these two warnings:

2020-09-29 09:46:38.508600: W tensorflow/stream_executor/platform/default/dso_loader.cc:59] Could not load dynamic library 'cudart64_110.dll'; dlerror: cudart64_110.dll not found

2020-09-29 09:46:38.508868: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.

I have looked online for solutions to the issue to no avail. Does anyone know how to solve this? Thank you very much in advance.

Subbu VidyaSekar
  • 2,503
  • 3
  • 21
  • 39
SRT
  • 21
  • 3
  • Are you using `GPU` device or `CPU` device to perform above task? If you are using `CPU` device then please ignore above warning. If you are using `GPU`, then there is an issue with your `Tensorflow GPU` installation. I have executed code in Colab and it is working as expected. –  Sep 30 '20 at 03:02
  • I'm not sure which one I am using, how do I check? – SRT Sep 30 '20 at 23:09
  • Can you please run `tensorflow.config.list_physical_devices('GPU')` and let me know what it returns? –  Oct 01 '20 at 04:23
  • Where do I run that? Command prompt? – SRT Oct 01 '20 at 13:45
  • Where did you install Tensorflow? –  Oct 01 '20 at 13:48
  • I installed it from the command prompt using pip – SRT Oct 01 '20 at 13:55
  • Then please run above code there, only after `import tensorflow as tf` –  Oct 01 '20 at 13:58
  • Ok so something really strange is happening, when I try and download tensorflow on pip, it says a bunch of statements with "requirements already satisfied", but when I run the "import tensorflow" statement in IDLE, it gives me an error that says "no module named tensorflow" – SRT Oct 01 '20 at 14:03
  • Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/222368/discussion-between-tfer2-and-srt). –  Oct 01 '20 at 14:05
  • Is your issue resolved now? Else let us know the your current status so that we can help you? –  Nov 06 '20 at 08:29
  • Never got it to work on the old laptop, switched to a new device and it somehow worked perfectly. – SRT Dec 07 '20 at 04:26

0 Answers0