Namburger / edgetpu-ssdlite-mobiledet-retrain

This repo contains the colab for my ssdlite mobiledet model retrain tutorial
37 stars 7 forks source link

Why it runs on GPU #8

Open hannes56a opened 3 years ago

hannes56a commented 3 years ago

Hi, what is the "secret" to let the model train on GPU? The tutorial from google runs only on CPU...? ( https://colab.research.google.com/github/google-coral/tutorials/blob/master/retrain_detection_qat_tf1.ipynb )

Thank you!

Namburger commented 3 years ago

@hannes56a it's faster on GPU, you can turn off GPU on colab but it'd take much longer

hannes56a commented 3 years ago

@Namburger: Hi. Thank you for your answer, but we missunderstood :-) I meant not the reason w"hy to let it run on GPU", but how do you do it... what is the part of code, wich is responsible, that tensoflow trains on GPU instead of CPU. But i think i have found it...: Is it the "import tensorflow-gpu" instead of "import tensorflow"?

Namburger commented 3 years ago

@hannes56a You can click on runtime -> change runtime type -> toggle from gpu to cpu. Even if you import tensorflow-gpu, I don't think tensorflow can run on it if the gpu is not present. Although the question I still have is why run on CPU lol I image that the you colab usage time would runout before you can finish training the model... which could take days