{
  "id": 213125,
  "title": "Tensorflow 2.4 on GPU not working. How to switch CUDA version?",
  "url": "/competitions/cassava-leaf-disease-classification/discussion/213125",
  "author_name": "",
  "post_date": "2021-01-21T15:34:25.323708Z",
  "votes": 2,
  "comment_count": 5,
  "views": 0,
  "content": "<p>Hi ,</p>\n<p>I am trying to use Tensorflow 2.4 with GPU but GPU usage is zero. Even CUDA 11 is installed, I am not aware on how to switch to Cuda 11 from 10. Here is screenshot of nvidia-smi.<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F1295006%2Ffe825a25993f54f98ecb9dedfa92ee54%2FScreenshot%202021-01-21%20at%209.01.25%20PM.png?generation=1611243255241348&amp;alt=media\" alt=\"img\"></p>\n<p><a href=\"https://www.kaggle.com/paultimothymooney\" target=\"_blank\">@paultimothymooney</a> </p>",
  "messages": [
    {
      "id": "1163186",
      "postDate": "01/21/2021 15:34:25",
      "content": "<p>Hi ,</p>\n<p>I am trying to use Tensorflow 2.4 with GPU but GPU usage is zero. Even CUDA 11 is installed, I am not aware on how to switch to Cuda 11 from 10. Here is screenshot of nvidia-smi.<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F1295006%2Ffe825a25993f54f98ecb9dedfa92ee54%2FScreenshot%202021-01-21%20at%209.01.25%20PM.png?generation=1611243255241348&amp;alt=media\" alt=\"img\"></p>\n<p><a href=\"https://www.kaggle.com/paultimothymooney\" target=\"_blank\">@paultimothymooney</a> </p>",
      "rawMarkdown": "Hi ,\n\nI am trying to use Tensorflow 2.4 with GPU but GPU usage is zero. Even CUDA 11 is installed, I am not aware on how to switch to Cuda 11 from 10. Here is screenshot of nvidia-smi.\n![img](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F1295006%2Ffe825a25993f54f98ecb9dedfa92ee54%2FScreenshot%202021-01-21%20at%209.01.25%20PM.png?generation=1611243255241348&alt=media)\n\n\n@paultimothymooney",
      "votes": null
    },
    {
      "id": "1163575",
      "postDate": "01/21/2021 19:13:46",
      "content": "<p>You should avoid switching cuda version, its not worth the time. </p>",
      "rawMarkdown": "You should avoid switching cuda version, its not worth the time.",
      "votes": null
    },
    {
      "id": "1164052",
      "postDate": "01/22/2021 05:35:57",
      "content": "<p>Actually want to use MultiAheadAttention layer in tensorflow 2.4 that is why it is worth the time!</p>",
      "rawMarkdown": "Actually want to use MultiAheadAttention layer in tensorflow 2.4 that is why it is worth the time!",
      "votes": null
    },
    {
      "id": "1164067",
      "postDate": "01/22/2021 05:54:46",
      "content": "<p>You can use MultiHeadAttention in TF 2.3 by using TensorFlow Addons.</p>\n<pre><code>import tensorflow_addons as tfa\nMHA = tfa.layers.MultiHeadAttention()\n</code></pre>\n<p>More info <a href=\"https://www.tensorflow.org/addons/api_docs/python/tfa/layers/MultiHeadAttention\" target=\"_blank\">here</a></p>",
      "rawMarkdown": "You can use MultiHeadAttention in TF 2.3 by using TensorFlow Addons.\n\n    import tensorflow_addons as tfa\n    MHA = tfa.layers.MultiHeadAttention()\n\nMore info [here][1]\n\n[1]: https://www.tensorflow.org/addons/api_docs/python/tfa/layers/MultiHeadAttention",
      "votes": null
    },
    {
      "id": "1164919",
      "postDate": "01/22/2021 16:08:05",
      "content": "<p>Hey <a href=\"https://www.kaggle.com/cdeotte\" target=\"_blank\">@cdeotte</a> ! Thanks a lot! Great to see you participate in this competition, I am feeling a lot of learnings are on the way!</p>",
      "rawMarkdown": "Hey @cdeotte ! Thanks a lot! Great to see you participate in this competition, I am feeling a lot of learnings are on the way!",
      "votes": null
    },
    {
      "id": "1164946",
      "postDate": "01/22/2021 16:32:14",
      "content": "<p>Okay for that <a href=\"http://aconcaguasci.blogspot.com/2019/12/setting-up-cuda-100-for-mxnet-on-google.html\" target=\"_blank\">this</a> should help. Maybe you'll have to downgrade cudnn drivers too, which you'll have to download from nvidia's website.</p>",
      "rawMarkdown": "Okay for that [this](http://aconcaguasci.blogspot.com/2019/12/setting-up-cuda-100-for-mxnet-on-google.html) should help. Maybe you'll have to downgrade cudnn drivers too, which you'll have to download from nvidia's website.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1163575,
      "author_name": "anku5hk",
      "author_url": "",
      "post_date": "01/21/2021 19:13:46",
      "content": "<p>You should avoid switching cuda version, its not worth the time. </p>",
      "votes": null,
      "replies": [
        {
          "id": 1164052,
          "author_name": "harveenchadha",
          "author_url": "",
          "post_date": "01/22/2021 05:35:57",
          "content": "<p>Actually want to use MultiAheadAttention layer in tensorflow 2.4 that is why it is worth the time!</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1164067,
          "author_name": "cdeotte",
          "author_url": "",
          "post_date": "01/22/2021 05:54:46",
          "content": "<p>You can use MultiHeadAttention in TF 2.3 by using TensorFlow Addons.</p>\n<pre><code>import tensorflow_addons as tfa\nMHA = tfa.layers.MultiHeadAttention()\n</code></pre>\n<p>More info <a href=\"https://www.tensorflow.org/addons/api_docs/python/tfa/layers/MultiHeadAttention\" target=\"_blank\">here</a></p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1164919,
          "author_name": "harveenchadha",
          "author_url": "",
          "post_date": "01/22/2021 16:08:05",
          "content": "<p>Hey <a href=\"https://www.kaggle.com/cdeotte\" target=\"_blank\">@cdeotte</a> ! Thanks a lot! Great to see you participate in this competition, I am feeling a lot of learnings are on the way!</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1164946,
          "author_name": "anku5hk",
          "author_url": "",
          "post_date": "01/22/2021 16:32:14",
          "content": "<p>Okay for that <a href=\"http://aconcaguasci.blogspot.com/2019/12/setting-up-cuda-100-for-mxnet-on-google.html\" target=\"_blank\">this</a> should help. Maybe you'll have to downgrade cudnn drivers too, which you'll have to download from nvidia's website.</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "1163186": "Hi ,\n\nI am trying to use Tensorflow 2.4 with GPU but GPU usage is zero. Even CUDA 11 is installed, I am not aware on how to switch to Cuda 11 from 10. Here is screenshot of nvidia-smi.\n![img](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F1295006%2Ffe825a25993f54f98ecb9dedfa92ee54%2FScreenshot%202021-01-21%20at%209.01.25%20PM.png?generation=1611243255241348&alt=media)\n\n\n@paultimothymooney",
    "1163575": "You should avoid switching cuda version, its not worth the time.",
    "1164052": "Actually want to use MultiAheadAttention layer in tensorflow 2.4 that is why it is worth the time!",
    "1164067": "You can use MultiHeadAttention in TF 2.3 by using TensorFlow Addons.\n\n    import tensorflow_addons as tfa\n    MHA = tfa.layers.MultiHeadAttention()\n\nMore info [here][1]\n\n[1]: https://www.tensorflow.org/addons/api_docs/python/tfa/layers/MultiHeadAttention",
    "1164919": "Hey @cdeotte ! Thanks a lot! Great to see you participate in this competition, I am feeling a lot of learnings are on the way!",
    "1164946": "Okay for that [this](http://aconcaguasci.blogspot.com/2019/12/setting-up-cuda-100-for-mxnet-on-google.html) should help. Maybe you'll have to downgrade cudnn drivers too, which you'll have to download from nvidia's website."
  },
  "source": "meta"
}