最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

tensorflow - My Google Colab GPU refuses to work. It gets connected and also shows that it's connected, but when I train

programmeradmin5浏览0评论

My Google Colab GPU doesn't get used even when I am connected to it. I'm trying to run a PyTorch model on Google Colab using the free GPU, but it seems that my code is still running on the CPU despite Colab detecting the GPU.

device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
print(f"Using device: {device}")

The output I got to this as in the colab file was:

Using device: cuda

This is the link to my Colab file: Colab file

I am using the free version of T4 GPU and even am connected to the correct runtime. It is not only for this code, it's for every code that I have worked on since the past 6 months. Before that, the GPU was getting used fine.

I want to know if it's a problem with my version or if I have installed something wrong in my system.

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论