{
  "id": 412295,
  "title": "Why torchaudio is better than librosa ?",
  "url": "/competitions/birdclef-2023/discussion/412295",
  "author_name": "Altair Farooque",
  "post_date": "2023-05-23T05:52:53.988000",
  "votes": 1,
  "comment_count": 5,
  "views": 0,
  "content": "<p>i have two preprocessing function one used torchaudio other used librosaa . But i find librosa mel spectograms slightly more better than torchaudio ( not much difference generates same featured mel specs but slight noise pickup in ta ) . I was training a model no matter what model i use resnet18 - efficientnetb0 training time for one epoch with batch size 32 takes around 45 - 50 mins ,when use librosa . I stuck finding why it takes so long .After some struggling , i found that torchaudio is faster than librosa ,now training time reduced to 18-20min per epoch with same config .</p>\n<p>Any tips for reducing further more ,i'm using efficientnetv2 small model training with pytorch lightningg ⚡.</p>\n<p>thank you 😄</p>",
  "messages": [
    {
      "id": 2273132,
      "postDate": "2023-05-25T03:10:42.943Z",
      "content": "<ol>\n<li>Integration with PyTorch</li>\n<li>GPU acceleration</li>\n<li>Differentiable operations</li>\n<li>Compatibility with Torch ecosystem</li>\n<li>Community support</li>\n</ol>",
      "rawMarkdown": "1. Integration with PyTorch\n2. GPU acceleration\n3. Differentiable operations\n4. Compatibility with Torch ecosystem\n5. Community support",
      "votes": 3,
      "replies": [
        {
          "id": 2274619,
          "postDate": "2023-05-26T06:29:10.370Z",
          "content": "<p>Nice one. thanks</p>",
          "rawMarkdown": "Nice one. thanks"
        }
      ]
    },
    {
      "id": 2270321,
      "postDate": "2023-05-23T05:52:53.990Z",
      "content": "<p>i have two preprocessing function one used torchaudio other used librosaa . But i find librosa mel spectograms slightly more better than torchaudio ( not much difference generates same featured mel specs but slight noise pickup in ta ) . I was training a model no matter what model i use resnet18 - efficientnetb0 training time for one epoch with batch size 32 takes around 45 - 50 mins ,when use librosa . I stuck finding why it takes so long .After some struggling , i found that torchaudio is faster than librosa ,now training time reduced to 18-20min per epoch with same config .</p>\n<p>Any tips for reducing further more ,i'm using efficientnetv2 small model training with pytorch lightningg ⚡.</p>\n<p>thank you 😄</p>",
      "rawMarkdown": "i have two preprocessing function one used torchaudio other used librosaa . But i find librosa mel spectograms slightly more better than torchaudio ( not much difference generates same featured mel specs but slight noise pickup in ta ) . I was training a model no matter what model i use resnet18 - efficientnetb0 training time for one epoch with batch size 32 takes around 45 - 50 mins ,when use librosa . I stuck finding why it takes so long .After some struggling , i found that torchaudio is faster than librosa ,now training time reduced to 18-20min per epoch with same config .\n\nAny tips for reducing further more ,i'm using efficientnetv2 small model training with pytorch lightningg ⚡.\n\nthank you 😄",
      "votes": 1
    },
    {
      "id": 2270401,
      "postDate": "2023-05-23T06:58:36.667Z",
      "rawMarkdown": "",
      "votes": -4,
      "isDeleted": true,
      "replies": [
        {
          "id": 2270590,
          "postDate": "2023-05-23T08:56:56.737Z",
          "content": "<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F12870466%2F2c5ec9bfb0bd7983c1b5e7cf7d35bb7c%2FScreenshot_95.jpg?generation=1684832109956677&amp;alt=media\" alt=\"\"><br>\n:)</p>\n<p>On another note tho, if you want to minimise the differences between librosa and torchaudio, check out this notebook made at the end of the previous BirdClef comp <a href=\"https://www.kaggle.com/code/nomorevotch/create-the-same-mel-from-librosa-and-torchaudio/notebook\" target=\"_blank\">here </a>that does exactely that !</p>",
          "rawMarkdown": "![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F12870466%2F2c5ec9bfb0bd7983c1b5e7cf7d35bb7c%2FScreenshot_95.jpg?generation=1684832109956677&alt=media)\n:)\n\nOn another note tho, if you want to minimise the differences between librosa and torchaudio, check out this notebook made at the end of the previous BirdClef comp [here ](https://www.kaggle.com/code/nomorevotch/create-the-same-mel-from-librosa-and-torchaudio/notebook)that does exactely that !",
          "votes": 2,
          "replies": [
            {
              "id": 2270638,
              "postDate": "2023-05-23T09:43:07.840Z",
              "content": "<p>Thanks for sharing , i was asking about how to make same mels in both torchaudio and librosa , the notebook u shared really helped me . Now i can update my training pipeline . 😄</p>",
              "rawMarkdown": "Thanks for sharing , i was asking about how to make same mels in both torchaudio and librosa , the notebook u shared really helped me . Now i can update my training pipeline . 😄",
              "votes": 1
            }
          ]
        }
      ]
    }
  ],
  "comments": [
    {
      "id": 2273132,
      "author_name": "Soheil Tehranipour",
      "author_url": "",
      "post_date": "2023-05-25T03:10:42.943000",
      "content": "<ol>\n<li>Integration with PyTorch</li>\n<li>GPU acceleration</li>\n<li>Differentiable operations</li>\n<li>Compatibility with Torch ecosystem</li>\n<li>Community support</li>\n</ol>",
      "votes": 3,
      "replies": [
        {
          "id": 2274619,
          "author_name": "Atena Vakili",
          "author_url": "",
          "post_date": "2023-05-26T06:29:10.370000",
          "content": "<p>Nice one. thanks</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 2270401,
      "author_name": "",
      "author_url": "",
      "post_date": "2023-05-23T06:58:36.667000",
      "content": "",
      "votes": -4,
      "replies": [
        {
          "id": 2270590,
          "author_name": "JEANMPIA",
          "author_url": "",
          "post_date": "2023-05-23T08:56:56.737000",
          "content": "<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F12870466%2F2c5ec9bfb0bd7983c1b5e7cf7d35bb7c%2FScreenshot_95.jpg?generation=1684832109956677&amp;alt=media\" alt=\"\"><br>\n:)</p>\n<p>On another note tho, if you want to minimise the differences between librosa and torchaudio, check out this notebook made at the end of the previous BirdClef comp <a href=\"https://www.kaggle.com/code/nomorevotch/create-the-same-mel-from-librosa-and-torchaudio/notebook\" target=\"_blank\">here </a>that does exactely that !</p>",
          "votes": 2,
          "replies": [
            {
              "id": 2270638,
              "author_name": "Altair Farooque",
              "author_url": "",
              "post_date": "2023-05-23T09:43:07.840000",
              "content": "<p>Thanks for sharing , i was asking about how to make same mels in both torchaudio and librosa , the notebook u shared really helped me . Now i can update my training pipeline . 😄</p>",
              "votes": 1,
              "replies": []
            }
          ]
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "2273132": "1. Integration with PyTorch\n2. GPU acceleration\n3. Differentiable operations\n4. Compatibility with Torch ecosystem\n5. Community support",
    "2270321": "i have two preprocessing function one used torchaudio other used librosaa . But i find librosa mel spectograms slightly more better than torchaudio ( not much difference generates same featured mel specs but slight noise pickup in ta ) . I was training a model no matter what model i use resnet18 - efficientnetb0 training time for one epoch with batch size 32 takes around 45 - 50 mins ,when use librosa . I stuck finding why it takes so long .After some struggling , i found that torchaudio is faster than librosa ,now training time reduced to 18-20min per epoch with same config .\n\nAny tips for reducing further more ,i'm using efficientnetv2 small model training with pytorch lightningg ⚡.\n\nthank you 😄",
    "2270401": ""
  }
}