0

I am following this article and paper (linked in the article) for a GAN for sketch to color image.

I have TensorFlow 2.4.0 installed along with CUDA 11.0 and CuDNN 8.0.4

Following this answer:

if tf.test.gpu_device_name():
    print('Default GPU Device: {}'.format(tf.test.gpu_device_name()))
else:
    print("Please install GPU version of TF")

This outputs: Default GPU Device: /device:GPU:0

Following other answers to the same question, tf is detecting my GPU. But my task manager shows really low GPU Utilization:

Task Manager Screenshot

Is there step I am missing for utilizing the GPU?

flaxel
  • 4,173
  • 4
  • 17
  • 30
  • Try to increase Batch Size of the training data and see if it make any difference. Also,during training model your GPU is sitting idle waiting for data. – Shubham Shaswat Dec 25 '20 at 12:38
  • @ShubhamShaswat I'll try and increase it to 24 and see what happens. What do you mean by the second point? If you've seen the article, the picture in the dataset has to be preprocessed and separated into 2 images and that is loaded. Is that step taking the time? – Eeshaan Jain Dec 25 '20 at 18:53
  • I can't say much from the picture if the preprocessing step is taking too much time but if you are using Tensorflow try to use `tf.data` for an efficent data pipeline – Shubham Shaswat Dec 25 '20 at 20:40
  • @ShubhamShaswat okay, I'll look into it. Increasing the batch size from 4 to 28 did reduce the time for each epoch from around 44 minutes to 25 minutes – Eeshaan Jain Dec 26 '20 at 05:12

0 Answers0