Google Colab Not using GPU Properly


OK, so i switch the runtime to use The GPU and restart the notebook.

I use the following code to check if GPU is connected.

import tensorflow as tf

I am using the below git-hub project to remove the background from images .

It takes approx 30 mins to remove background of 86 Images.

I have used Google drive to read my Images (It took the Same 30 mins)

Then i downloaded the same dateset to my Google colab itself from MediaFire (Again took same 30 mins)

Now the thing is without the GPU, it also takes the Same time, that is 30 Mins (SO am i using the GPU or CPU wrong or is it not being utilized properly. ?

Please Help, Thanks

You need to update the requirement.txt to work with the current stable version of TF 2.6

hi actually i edited the requirements file and removes all the == signs.

that means

torch==1.22 becomes

and so on.

so installed all latest versions, but still i get this problem. please check out the pic below, i got from kaggle. it does not use the GPU at all, But uses 100% of CPU

Please check if your are going to use PyTorch not TensorFlow with the instructions at:

If you are going to use Pytorch I suggest to post this on:

1 Like

oh yes i am using pytorch, sorry for posting here