{
  "id": 588848,
  "title": "Different sequence length",
  "url": "/competitions/cmi-detect-behavior-with-sensor-data/discussion/588848",
  "author_name": "",
  "post_date": "2025-07-08T16:35:35.535891300Z",
  "votes": 2,
  "comment_count": 4,
  "views": 0,
  "content": "<p>I\"m just wondering how yall deal with different sample size for each sequence? </p>",
  "messages": [
    {
      "id": "3244868",
      "postDate": "07/08/2025 16:35:35",
      "content": "<p>I\"m just wondering how yall deal with different sample size for each sequence? </p>",
      "rawMarkdown": "I\"m just wondering how yall deal with different sample size for each sequence?",
      "votes": null
    },
    {
      "id": "3244965",
      "postDate": "07/08/2025 17:51:50",
      "content": "<p>You can use padding and truncating.</p>",
      "rawMarkdown": "You can use padding and truncating.",
      "votes": null
    },
    {
      "id": "3247045",
      "postDate": "07/12/2025 02:15:07",
      "content": "<p>Assuming you are padding/truncating, have you tested many different sequence lengths? I've got a 1dcnn model and a cnn-gru hybrid that seem to do better with different sequence lengths. </p>",
      "rawMarkdown": "Assuming you are padding/truncating, have you tested many different sequence lengths? I've got a 1dcnn model and a cnn-gru hybrid that seem to do better with different sequence lengths.",
      "votes": null
    },
    {
      "id": "3249088",
      "postDate": "07/15/2025 17:02:55",
      "content": "<p><a href=\"https://www.kaggle.com/jackvd\" target=\"_blank\">@jackvd</a> have you tried a data collator which pads dynamically? That is padding to the max sequence in the batch. I haven't tried it yet because my batch size is 128 and I think statistically wouldn't make a difference because it's highly likely that a long sequence will end in the batch. But I wonder if this has worked for anyone</p>",
      "rawMarkdown": "jackvd have you tried a data collator which pads dynamically? That is padding to the max sequence in the batch. I haven't tried it yet because my batch size is 128 and I think statistically wouldn't make a difference because it's highly likely that a long sequence will end in the batch. But I wonder if this has worked for anyone",
      "votes": null
    },
    {
      "id": "3249128",
      "postDate": "07/15/2025 18:59:39",
      "content": "<p>I tried it but didn't find much success with it. Not totally sure why. I'm currently trying CNN-transformer that uses masking so might give it a go. I think my main improvements won't be from fiddling with sequence length though - feature engineering and architectural improvements are what remain for me. I also need to finally dig into full data models! TOF sure is a looooooooooot of data</p>",
      "rawMarkdown": "I tried it but didn't find much success with it. Not totally sure why. I'm currently trying CNN-transformer that uses masking so might give it a go. I think my main improvements won't be from fiddling with sequence length though - feature engineering and architectural improvements are what remain for me. I also need to finally dig into full data models! TOF sure is a looooooooooot of data",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 3244965,
      "author_name": "nlztrk",
      "author_url": "",
      "post_date": "07/08/2025 17:51:50",
      "content": "<p>You can use padding and truncating.</p>",
      "votes": null,
      "replies": [
        {
          "id": 3247045,
          "author_name": "jackvd",
          "author_url": "",
          "post_date": "07/12/2025 02:15:07",
          "content": "<p>Assuming you are padding/truncating, have you tested many different sequence lengths? I've got a 1dcnn model and a cnn-gru hybrid that seem to do better with different sequence lengths. </p>",
          "votes": null,
          "replies": [
            {
              "id": 3249088,
              "author_name": "alejopaullier",
              "author_url": "",
              "post_date": "07/15/2025 17:02:55",
              "content": "<p><a href=\"https://www.kaggle.com/jackvd\" target=\"_blank\">@jackvd</a> have you tried a data collator which pads dynamically? That is padding to the max sequence in the batch. I haven't tried it yet because my batch size is 128 and I think statistically wouldn't make a difference because it's highly likely that a long sequence will end in the batch. But I wonder if this has worked for anyone</p>",
              "votes": null,
              "replies": [
                {
                  "id": 3249128,
                  "author_name": "jackvd",
                  "author_url": "",
                  "post_date": "07/15/2025 18:59:39",
                  "content": "<p>I tried it but didn't find much success with it. Not totally sure why. I'm currently trying CNN-transformer that uses masking so might give it a go. I think my main improvements won't be from fiddling with sequence length though - feature engineering and architectural improvements are what remain for me. I also need to finally dig into full data models! TOF sure is a looooooooooot of data</p>",
                  "votes": null,
                  "replies": []
                }
              ]
            }
          ]
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "3244868": "I\"m just wondering how yall deal with different sample size for each sequence?",
    "3244965": "You can use padding and truncating.",
    "3247045": "Assuming you are padding/truncating, have you tested many different sequence lengths? I've got a 1dcnn model and a cnn-gru hybrid that seem to do better with different sequence lengths.",
    "3249088": "jackvd have you tried a data collator which pads dynamically? That is padding to the max sequence in the batch. I haven't tried it yet because my batch size is 128 and I think statistically wouldn't make a difference because it's highly likely that a long sequence will end in the batch. But I wonder if this has worked for anyone",
    "3249128": "I tried it but didn't find much success with it. Not totally sure why. I'm currently trying CNN-transformer that uses masking so might give it a go. I think my main improvements won't be from fiddling with sequence length though - feature engineering and architectural improvements are what remain for me. I also need to finally dig into full data models! TOF sure is a looooooooooot of data"
  },
  "source": "meta"
}