{
  "id": 270019,
  "title": "The parameters 'hop_length' of the cqt?",
  "url": "/competitions/g2net-gravitational-wave-detection/discussion/270019",
  "author_name": "",
  "post_date": "2021-09-03T06:34:49.227613200Z",
  "votes": 15,
  "comment_count": 15,
  "views": 0,
  "content": "<p>When I change the 'hop_length' parameters in the cqt, I find the 'hop_length' is more smaller, the auc result is more better. But the speed of the training is more slower. So ,how do we choose a better 'hop_length' value? Btw, now I use the 'hop_length=4'.</p>",
  "messages": [
    {
      "id": "1501368",
      "postDate": "09/03/2021 06:34:49",
      "content": "<p>When I change the 'hop_length' parameters in the cqt, I find the 'hop_length' is more smaller, the auc result is more better. But the speed of the training is more slower. So ,how do we choose a better 'hop_length' value? Btw, now I use the 'hop_length=4'.</p>",
      "rawMarkdown": "When I change the 'hop_length' parameters in the cqt, I find the 'hop_length' is more smaller, the auc result is more better. But the speed of the training is more slower. So ,how do we choose a better 'hop_length' value? Btw, now I use the 'hop_length=4'.",
      "votes": null
    },
    {
      "id": "1501420",
      "postDate": "09/03/2021 07:53:08",
      "content": "<p>hop_length is the distance between windows in CQT. It is equivalent to stride in CNN. <br>\n<img src=\"https://www.mdpi.com/applsci/applsci-10-07208/article_deploy/html/images/applsci-10-07208-g001-550.jpg\" alt=\"\"></p>",
      "rawMarkdown": "hop_length is the distance between windows in CQT. It is equivalent to stride in CNN. \n![](https://www.mdpi.com/applsci/applsci-10-07208/article_deploy/html/images/applsci-10-07208-g001-550.jpg)",
      "votes": null
    },
    {
      "id": "1501427",
      "postDate": "09/03/2021 07:59:27",
      "content": "<p>Thanks for your reply! So, the value is more smaller, the result is more better😂. The value is more smaller, it can find more details?</p>",
      "rawMarkdown": "Thanks for your reply! So, the value is more smaller, the result is more better😂. The value is more smaller, it can find more details?",
      "votes": null
    },
    {
      "id": "1501439",
      "postDate": "09/03/2021 08:14:23",
      "content": "<p>That's not always the case. </p>",
      "rawMarkdown": "That's not always the case. ~~There is a trade-off between time resolution and frequency resolution.~~",
      "votes": null
    },
    {
      "id": "1501448",
      "postDate": "09/03/2021 08:26:18",
      "content": "<p>How? I feel like you get more time resolution without losing frequency resolution with smaller hop_length.</p>",
      "rawMarkdown": "How? I feel like you get more time resolution without losing frequency resolution with smaller hop_length.",
      "votes": null
    },
    {
      "id": "1501460",
      "postDate": "09/03/2021 08:42:55",
      "content": "<p><a href=\"https://www.kaggle.com/aerdem4\" target=\"_blank\">@aerdem4</a> <br>\nThank you for pointing out. <br>\nTheoretically, yes - smaller hop_length improves time resolution without losing frequency resolution. <br>\nBut some of my experiments are not consistent with this, probably due to other factors.</p>",
      "rawMarkdown": "aerdem4 \nThank you for pointing out. \nTheoretically, yes - smaller hop_length improves time resolution without losing frequency resolution. \nBut some of my experiments are not consistent with this, probably due to other factors.",
      "votes": null
    },
    {
      "id": "1501782",
      "postDate": "09/03/2021 14:20:23",
      "content": "<p>Hop length is similar to hop length in STFT.  As <a href=\"https://www.kaggle.com/analokamus\" target=\"_blank\">@analokamus</a> wrote, they are stride if you look at these transformation sas convolutions. smaller hop means larger images as output.</p>\n<p>Larger images may be better, or not, depending on your model</p>",
      "rawMarkdown": "Hop length is similar to hop length in STFT.  As @analokamus wrote, they are stride if you look at these transformation sas convolutions. smaller hop means larger images as output.\n\nLarger images may be better, or not, depending on your model",
      "votes": null
    },
    {
      "id": "1501813",
      "postDate": "09/03/2021 15:03:27",
      "content": "<p>I'm sorry if I'm wrong, I think you improve time resolution by changing the window size, not the hop length. The tradeoff between time and frequency resolution is in the selection of window size. </p>",
      "rawMarkdown": "I'm sorry if I'm wrong, I think you improve time resolution by changing the window size, not the hop length. The tradeoff between time and frequency resolution is in the selection of window size.",
      "votes": null
    },
    {
      "id": "1502216",
      "postDate": "09/04/2021 03:17:13",
      "content": "<p><a href=\"https://www.kaggle.com/nyleve\" target=\"_blank\">@nyleve</a> Both you and Ahmet are correct. The term 'resolution' used here has two aspects.</p>",
      "rawMarkdown": "nyleve Both you and Ahmet are correct. The term 'resolution' used here has two aspects.",
      "votes": null
    },
    {
      "id": "1502356",
      "postDate": "09/04/2021 07:13:44",
      "content": "<p><a href=\"https://www.kaggle.com/nyleve\" target=\"_blank\">@nyleve</a> please help me understand below things</p>\n<p>1)How does CQT determines the window length. can we pass this as parameter<br>\n2) Is window length specific to DFT or CQT</p>",
      "rawMarkdown": "nyleve please help me understand below things\n\n1)How does CQT determines the window length. can we pass this as parameter\n2) Is window length specific to DFT or CQT",
      "votes": null
    },
    {
      "id": "1503264",
      "postDate": "09/05/2021 07:52:43",
      "content": "<p>Reducing hop length doesn't seem to work in my case :(</p>",
      "rawMarkdown": "Reducing hop length doesn't seem to work in my case :(",
      "votes": null
    },
    {
      "id": "1503287",
      "postDate": "09/05/2021 08:23:56",
      "content": "<p>may be, this should be accompanied by an increase of the image size, since this would increase the size of the array output by CQT. Reducing hop_length works for me.</p>",
      "rawMarkdown": "may be, this should be accompanied by an increase of the image size, since this would increase the size of the array output by CQT. Reducing hop_length works for me.",
      "votes": null
    },
    {
      "id": "1503295",
      "postDate": "09/05/2021 08:30:48",
      "content": "<p>I used 512, hop length 16 and 2 gives almost similar results. What size are you using?</p>",
      "rawMarkdown": "I used 512, hop length 16 and 2 gives almost similar results. What size are you using?",
      "votes": null
    },
    {
      "id": "1503640",
      "postDate": "09/05/2021 14:45:58",
      "content": "<p>hop_length=8 gives a CQT output with size=513 along the time axis. I guess that if you use lower hop_length values and afterwards rescale this dimension  to 512, you may loss the benefits of the finer time sampling.</p>\n<p>In my experiments, I directly used the image size that results from the <code>hop_length, bin_per_octave</code> settings. This ends up with rectangular images and using hop_length &lt; 8 gives slight boosts at the cost of higher compute times.</p>",
      "rawMarkdown": "hop_length=8 gives a CQT output with size=513 along the time axis. I guess that if you use lower hop_length values and afterwards rescale this dimension  to 512, you may loss the benefits of the finer time sampling.\n\nIn my experiments, I directly used the image size that results from the `hop_length, bin_per_octave` settings. This ends up with rectangular images and using hop_length < 8 gives slight boosts at the cost of higher compute times.",
      "votes": null
    },
    {
      "id": "1503685",
      "postDate": "09/05/2021 15:27:59",
      "content": "<p>Ah, got it! Thanks!</p>",
      "rawMarkdown": "Ah, got it! Thanks!",
      "votes": null
    },
    {
      "id": "1559958",
      "postDate": "10/27/2021 08:37:29",
      "content": "<p>Hey All,</p>\n<p>Thank you all for taking part in our competition. The participation has been overwhelmingly positive. We are currently conducting a survey to gauge the demographic and outreach achieved. Kindly spare 2min and fill in this survey <a href=\"https://forms.gle/QP9L16niPexozyhu5\" target=\"_blank\">https://forms.gle/QP9L16niPexozyhu5</a>.</p>\n<p>Thank you all,</p>\n<p>Regards,<br>\nChris</p>",
      "rawMarkdown": "Hey All,\n\nThank you all for taking part in our competition. The participation has been overwhelmingly positive. We are currently conducting a survey to gauge the demographic and outreach achieved. Kindly spare 2min and fill in this survey https://forms.gle/QP9L16niPexozyhu5.\n\nThank you all,\n\nRegards,\nChris",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1501420,
      "author_name": "analokamus",
      "author_url": "",
      "post_date": "09/03/2021 07:53:08",
      "content": "<p>hop_length is the distance between windows in CQT. It is equivalent to stride in CNN. <br>\n<img src=\"https://www.mdpi.com/applsci/applsci-10-07208/article_deploy/html/images/applsci-10-07208-g001-550.jpg\" alt=\"\"></p>",
      "votes": null,
      "replies": [
        {
          "id": 1501427,
          "author_name": "bcwang",
          "author_url": "",
          "post_date": "09/03/2021 07:59:27",
          "content": "<p>Thanks for your reply! So, the value is more smaller, the result is more better😂. The value is more smaller, it can find more details?</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1501439,
          "author_name": "analokamus",
          "author_url": "",
          "post_date": "09/03/2021 08:14:23",
          "content": "<p>That's not always the case. </p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1501448,
          "author_name": "aerdem4",
          "author_url": "",
          "post_date": "09/03/2021 08:26:18",
          "content": "<p>How? I feel like you get more time resolution without losing frequency resolution with smaller hop_length.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1501460,
          "author_name": "analokamus",
          "author_url": "",
          "post_date": "09/03/2021 08:42:55",
          "content": "<p><a href=\"https://www.kaggle.com/aerdem4\" target=\"_blank\">@aerdem4</a> <br>\nThank you for pointing out. <br>\nTheoretically, yes - smaller hop_length improves time resolution without losing frequency resolution. <br>\nBut some of my experiments are not consistent with this, probably due to other factors.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1501813,
          "author_name": "nyleve",
          "author_url": "",
          "post_date": "09/03/2021 15:03:27",
          "content": "<p>I'm sorry if I'm wrong, I think you improve time resolution by changing the window size, not the hop length. The tradeoff between time and frequency resolution is in the selection of window size. </p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1502216,
          "author_name": "analokamus",
          "author_url": "",
          "post_date": "09/04/2021 03:17:13",
          "content": "<p><a href=\"https://www.kaggle.com/nyleve\" target=\"_blank\">@nyleve</a> Both you and Ahmet are correct. The term 'resolution' used here has two aspects.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1502356,
          "author_name": "jaideepvalani",
          "author_url": "",
          "post_date": "09/04/2021 07:13:44",
          "content": "<p><a href=\"https://www.kaggle.com/nyleve\" target=\"_blank\">@nyleve</a> please help me understand below things</p>\n<p>1)How does CQT determines the window length. can we pass this as parameter<br>\n2) Is window length specific to DFT or CQT</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 1501782,
      "author_name": "cpmpml",
      "author_url": "",
      "post_date": "09/03/2021 14:20:23",
      "content": "<p>Hop length is similar to hop length in STFT.  As <a href=\"https://www.kaggle.com/analokamus\" target=\"_blank\">@analokamus</a> wrote, they are stride if you look at these transformation sas convolutions. smaller hop means larger images as output.</p>\n<p>Larger images may be better, or not, depending on your model</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1503264,
      "author_name": "zarif98sjs",
      "author_url": "",
      "post_date": "09/05/2021 07:52:43",
      "content": "<p>Reducing hop length doesn't seem to work in my case :(</p>",
      "votes": null,
      "replies": [
        {
          "id": 1503287,
          "author_name": "fabiendaniel",
          "author_url": "",
          "post_date": "09/05/2021 08:23:56",
          "content": "<p>may be, this should be accompanied by an increase of the image size, since this would increase the size of the array output by CQT. Reducing hop_length works for me.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1503295,
          "author_name": "zarif98sjs",
          "author_url": "",
          "post_date": "09/05/2021 08:30:48",
          "content": "<p>I used 512, hop length 16 and 2 gives almost similar results. What size are you using?</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1503640,
          "author_name": "fabiendaniel",
          "author_url": "",
          "post_date": "09/05/2021 14:45:58",
          "content": "<p>hop_length=8 gives a CQT output with size=513 along the time axis. I guess that if you use lower hop_length values and afterwards rescale this dimension  to 512, you may loss the benefits of the finer time sampling.</p>\n<p>In my experiments, I directly used the image size that results from the <code>hop_length, bin_per_octave</code> settings. This ends up with rectangular images and using hop_length &lt; 8 gives slight boosts at the cost of higher compute times.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1503685,
          "author_name": "zarif98sjs",
          "author_url": "",
          "post_date": "09/05/2021 15:27:59",
          "content": "<p>Ah, got it! Thanks!</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 1559958,
      "author_name": "zerafachris",
      "author_url": "",
      "post_date": "10/27/2021 08:37:29",
      "content": "<p>Hey All,</p>\n<p>Thank you all for taking part in our competition. The participation has been overwhelmingly positive. We are currently conducting a survey to gauge the demographic and outreach achieved. Kindly spare 2min and fill in this survey <a href=\"https://forms.gle/QP9L16niPexozyhu5\" target=\"_blank\">https://forms.gle/QP9L16niPexozyhu5</a>.</p>\n<p>Thank you all,</p>\n<p>Regards,<br>\nChris</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "1501368": "When I change the 'hop_length' parameters in the cqt, I find the 'hop_length' is more smaller, the auc result is more better. But the speed of the training is more slower. So ,how do we choose a better 'hop_length' value? Btw, now I use the 'hop_length=4'.",
    "1501420": "hop_length is the distance between windows in CQT. It is equivalent to stride in CNN. \n![](https://www.mdpi.com/applsci/applsci-10-07208/article_deploy/html/images/applsci-10-07208-g001-550.jpg)",
    "1501427": "Thanks for your reply! So, the value is more smaller, the result is more better😂. The value is more smaller, it can find more details?",
    "1501439": "That's not always the case. ~~There is a trade-off between time resolution and frequency resolution.~~",
    "1501448": "How? I feel like you get more time resolution without losing frequency resolution with smaller hop_length.",
    "1501460": "aerdem4 \nThank you for pointing out. \nTheoretically, yes - smaller hop_length improves time resolution without losing frequency resolution. \nBut some of my experiments are not consistent with this, probably due to other factors.",
    "1501782": "Hop length is similar to hop length in STFT.  As @analokamus wrote, they are stride if you look at these transformation sas convolutions. smaller hop means larger images as output.\n\nLarger images may be better, or not, depending on your model",
    "1501813": "I'm sorry if I'm wrong, I think you improve time resolution by changing the window size, not the hop length. The tradeoff between time and frequency resolution is in the selection of window size.",
    "1502216": "nyleve Both you and Ahmet are correct. The term 'resolution' used here has two aspects.",
    "1502356": "nyleve please help me understand below things\n\n1)How does CQT determines the window length. can we pass this as parameter\n2) Is window length specific to DFT or CQT",
    "1503264": "Reducing hop length doesn't seem to work in my case :(",
    "1503287": "may be, this should be accompanied by an increase of the image size, since this would increase the size of the array output by CQT. Reducing hop_length works for me.",
    "1503295": "I used 512, hop length 16 and 2 gives almost similar results. What size are you using?",
    "1503640": "hop_length=8 gives a CQT output with size=513 along the time axis. I guess that if you use lower hop_length values and afterwards rescale this dimension  to 512, you may loss the benefits of the finer time sampling.\n\nIn my experiments, I directly used the image size that results from the `hop_length, bin_per_octave` settings. This ends up with rectangular images and using hop_length < 8 gives slight boosts at the cost of higher compute times.",
    "1503685": "Ah, got it! Thanks!",
    "1559958": "Hey All,\n\nThank you all for taking part in our competition. The participation has been overwhelmingly positive. We are currently conducting a survey to gauge the demographic and outreach achieved. Kindly spare 2min and fill in this survey https://forms.gle/QP9L16niPexozyhu5.\n\nThank you all,\n\nRegards,\nChris"
  },
  "source": "meta"
}