Hi! I have a doubt about how the torch.cuda.is_available() works.
While training my network, I usually use the code:
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
network.to(device)
data.to(device)
...

But I found that torch.cuda.is_available() is still True when the network is being trained.
I am not sure why this happens. Does this mean that the code isn’t running on a GPU?