Closed Muaz65 closed 3 years ago
Hey, You should try 2 things:
You already did the first step, and since Keras is now fully encapsulated within Tensorflow, it should use your GPU directly. You can make sure of that with:
import tensorflow as tf
print("Num GPUs Available: ", len(tf.config.list_physical_devices('GPU')))
Let me know if this helps, Cheers
@DonsetPG tf was detecting GPU. The issue was with CUDATOOLKIT. When i installed torch with bundled CUDA 11.0, the model automatically started working on GPU.
I am Pytorch User and have not much idea about tensorflow. I am trying to run Keras Models (Homography, Keypoints) on GPU. I have RTX 3090 with CUDA 11.2. I installed Tensorflow-gpu==2.2.0 intsead of simple tensorflow and also tried adding these lines before loading models.
with tf.device('/GPU:0'):
Can you please guide me how can i load these models on GPU instead of CPU.