CoolFace
Datasetpublic

Anurag1734/cuda-error-resolution-analysis

sourceHugging Faceupdated 2mo agoView on Hugging Face
0likes7downloads
topics_batch_545.json67247 linesDownload Raw Back to raw
1[2  {3    "post_stream": {4      "posts": [5        {6          "id": 147531,7          "name": "Had",8          "username": "hadaev8",9          "avatar_template": "/user_avatar/discuss.pytorch.org/hadaev8/{size}/16280_2.png",10          "created_at": "2019-11-20T16:35:42.000Z",11          "cooked": "<p>Im trying to use this model</p><aside class=\"onebox githubblob\" data-onebox-src=\"https://github.com/NVIDIA/tacotron2/blob/master/model.py#L487\">\n  <header class=\"source\">\n\n      <a href=\"https://github.com/NVIDIA/tacotron2/blob/master/model.py#L487\" target=\"_blank\" rel=\"noopener nofollow ugc\">github.com</a>\n  </header>\n\n  <article class=\"onebox-body\">\n    <h4><a href=\"https://github.com/NVIDIA/tacotron2/blob/master/model.py#L487\" target=\"_blank\" rel=\"noopener nofollow ugc\">NVIDIA/tacotron2/blob/master/model.py#L487</a></h4>\n\n\n\n    <pre class=\"onebox\"><code class=\"lang-py\">\n      <ol class=\"start lines\" start=\"477\" style=\"counter-reset: li-counter 476 ;\">\n          <li>    input_lengths = to_gpu(input_lengths).long()</li>\n          <li>    max_len = torch.max(input_lengths.data).item()</li>\n          <li>    mel_padded = to_gpu(mel_padded).float()</li>\n          <li>    gate_padded = to_gpu(gate_padded).float()</li>\n          <li>    output_lengths = to_gpu(output_lengths).long()</li>\n          <li></li>\n          <li>    return (</li>\n          <li>        (text_padded, input_lengths, mel_padded, max_len, output_lengths),</li>\n          <li>        (mel_padded, gate_padded))</li>\n          <li></li>\n          <li class=\"selected\">def parse_output(self, outputs, output_lengths=None):</li>\n          <li>    if self.mask_padding and output_lengths is not None:</li>\n          <li>        mask = ~get_mask_from_lengths(output_lengths)</li>\n          <li>        mask = mask.expand(self.n_mel_channels, mask.size(0), mask.size(1))</li>\n          <li>        mask = mask.permute(1, 0, 2)</li>\n          <li></li>\n          <li>        outputs[0].data.masked_fill_(mask, 0.0)</li>\n          <li>        outputs[1].data.masked_fill_(mask, 0.0)</li>\n          <li>        outputs[2].data.masked_fill_(mask[:, 0, :], 1e3)  # gate energies</li>\n          <li></li>\n          <li>    return outputs</li>\n      </ol>\n    </code></pre>\n\n\n\n  </article>\n\n  <div class=\"onebox-metadata\">\n    \n    \n  </div>\n\n  <div style=\"clear: both\"></div>\n</aside>\n<p>\nBut getting this error</p>\n<blockquote>\n<p>File “/home/ec2-user/anaconda3/envs/pytorch_p36/lib/python3.6/site-packages/torch/nn/parallel/parallel_apply.py”, line 60, in <em>worker<br>\noutput = module(*input, **kwargs)<br>\nFile “/home/ec2-user/anaconda3/envs/pytorch_p36/lib/python3.6/site-packages/torch/nn/modules/module.py”, line 547, in <strong>call</strong><br>\nresult = self.forward(*input, **kwargs)<br>\nFile “/home/ec2-user/SageMaker/tacotron2/model/model.py”, line 480, in forward<br>\noutput_lengths)<br>\nFile “/home/ec2-user/SageMaker/tacotron2/model/model.py”, line 452, in parse_output<br>\noutputs[0].data.masked_fill</em>(mask, 0.0)<br>\nRuntimeError: The expanded size of the tensor (1079) must match the existing size (836) at non-singleton dimension 2.  Target sizes: [4, 80, 1079].  Tensor sizes: [4, 80, 836]</p>\n</blockquote>\n<p>How to solve it?</p>",12          "post_number": 1,13          "post_type": 1,14          "posts_count": 3,15          "updated_at": "2019-11-20T16:35:42.000Z",16          "reply_count": 0,17          "reply_to_post_number": null,18          "quote_count": 0,19          "incoming_link_count": 87,20          "reads": 15,21          "readers_count": 14,22          "score": 438.0,23          "yours": false,24          "topic_id": 61631,25          "topic_slug": "distributeddataparallel-do-not-work-with-custom-function-in-model",26          "display_username": "Had",27          "primary_group_name": null,28          "flair_name": null,29          "flair_url": null,30          "flair_bg_color": null,31          "flair_color": null,32          "flair_group_id": null,33          "badges_granted": [],34          "version": 1,35          "can_edit": false,36          "can_delete": false,37          "can_recover": false,38          "can_see_hidden_post": false,39          "can_wiki": false,40          "link_counts": [41            {42              "url": "https://github.com/NVIDIA/tacotron2/blob/master/model.py#L487",43              "internal": false,44              "reflection": false,45              "title": "tacotron2/model.py at master · NVIDIA/tacotron2 · GitHub",46              "clicks": 047            }48          ],49          "read": true,50          "user_title": null,51          "bookmarked": false,52          "actions_summary": [],53          "moderator": false,54          "admin": false,55          "staff": false,56          "user_id": 22803,57          "hidden": false,58          "trust_level": 2,59          "deleted_at": null,60          "user_deleted": false,61          "edit_reason": null,62          "can_view_edit_history": true,63          "wiki": false,64          "post_url": "/t/distributeddataparallel-do-not-work-with-custom-function-in-model/61631/1",65          "can_accept_answer": false,66          "can_unaccept_answer": false,67          "accepted_answer": false,68          "topic_accepted_answer": null,69          "can_vote": false70        },71        {72          "id": 148934,73          "name": "Pritamdamania87",74          "username": "pritamdamania87",75          "avatar_template": "/user_avatar/discuss.pytorch.org/pritamdamania87/{size}/28891_2.png",76          "created_at": "2019-11-26T20:06:23.512Z",77          "cooked": "<p>Could you provide your DDP code to reproduce the issue? Also, does the model work properly without DDP?</p>",78          "post_number": 2,79          "post_type": 1,80          "posts_count": 3,81          "updated_at": "2019-11-26T20:06:23.512Z",82          "reply_count": 1,83          "reply_to_post_number": null,84          "quote_count": 0,85          "incoming_link_count": 1,86          "reads": 14,87          "readers_count": 13,88          "score": 12.8,89          "yours": false,90          "topic_id": 61631,91          "topic_slug": "distributeddataparallel-do-not-work-with-custom-function-in-model",92          "display_username": "Pritamdamania87",93          "primary_group_name": null,94          "flair_name": null,95          "flair_url": null,96          "flair_bg_color": null,97          "flair_color": null,98          "flair_group_id": null,99          "badges_granted": [],100          "version": 1,101          "can_edit": false,102          "can_delete": false,103          "can_recover": false,104          "can_see_hidden_post": false,105          "can_wiki": false,106          "read": true,107          "user_title": null,108          "bookmarked": false,109          "actions_summary": [],110          "moderator": false,111          "admin": false,112          "staff": false,113          "user_id": 18862,114          "hidden": false,115          "trust_level": 2,116          "deleted_at": null,117          "user_deleted": false,118          "edit_reason": null,119          "can_view_edit_history": true,120          "wiki": false,121          "post_url": "/t/distributeddataparallel-do-not-work-with-custom-function-in-model/61631/2",122          "can_accept_answer": false,123          "can_unaccept_answer": false,124          "accepted_answer": false,125          "topic_accepted_answer": null126        },127        {128          "id": 149488,129          "name": "Had",130          "username": "hadaev8",131          "avatar_template": "/user_avatar/discuss.pytorch.org/hadaev8/{size}/16280_2.png",132          "created_at": "2019-11-29T15:21:30.023Z",133          "cooked": "<p><a href=\"https://colab.research.google.com/drive/104LtQ1zIioIOMQEPgVve77m5Rd4Gm0wU\" class=\"onebox\" target=\"_blank\" rel=\"nofollow noopener\">https://colab.research.google.com/drive/104LtQ1zIioIOMQEPgVve77m5Rd4Gm0wU</a><br>\nYes, it is works fine, also same code works fine on single gpu colab instance.<br>\nTested on 8 v100 instance from amazon.</p>",134          "post_number": 3,135          "post_type": 1,136          "posts_count": 3,137          "updated_at": "2019-11-29T15:21:30.023Z",138          "reply_count": 0,139          "reply_to_post_number": 2,140          "quote_count": 0,141          "incoming_link_count": 0,142          "reads": 11,143          "readers_count": 10,144          "score": 2.2,145          "yours": false,146          "topic_id": 61631,147          "topic_slug": "distributeddataparallel-do-not-work-with-custom-function-in-model",148          "display_username": "Had",149          "primary_group_name": null,150          "flair_name": null,151          "flair_url": null,152          "flair_bg_color": null,153          "flair_color": null,154          "flair_group_id": null,155          "badges_granted": [],156          "version": 1,157          "can_edit": false,158          "can_delete": false,159          "can_recover": false,160          "can_see_hidden_post": false,161          "can_wiki": false,162          "link_counts": [163            {164              "url": "https://colab.research.google.com/drive/104LtQ1zIioIOMQEPgVve77m5Rd4Gm0wU",165              "internal": false,166              "reflection": false,167              "clicks": 10168            }169          ],170          "read": true,171          "user_title": null,172          "reply_to_user": {173            "id": 18862,174            "username": "pritamdamania87",175            "name": "Pritamdamania87",176            "avatar_template": "/user_avatar/discuss.pytorch.org/pritamdamania87/{size}/28891_2.png"177          },178          "bookmarked": false,179          "actions_summary": [],180          "moderator": false,181          "admin": false,182          "staff": false,183          "user_id": 22803,184          "hidden": false,185          "trust_level": 2,186          "deleted_at": null,187          "user_deleted": false,188          "edit_reason": null,189          "can_view_edit_history": true,190          "wiki": false,191          "post_url": "/t/distributeddataparallel-do-not-work-with-custom-function-in-model/61631/3",192          "can_accept_answer": false,193          "can_unaccept_answer": false,194          "accepted_answer": false,195          "topic_accepted_answer": null196        }197      ],198      "stream": [199        147531,200        148934,201        149488202      ]203    },204    "timeline_lookup": [205      [206        1,207        2166208      ],209      [210        2,211        2160212      ],213      [214        3,215        2157216      ]217    ],218    "suggested_topics": [219      {220        "fancy_title": "CPU memory in FSDP lora merging",221        "id": 216659,222        "title": "CPU memory in FSDP lora merging",223        "slug": "cpu-memory-in-fsdp-lora-merging",224        "posts_count": 1,225        "reply_count": 0,226        "highest_post_number": 1,227        "image_url": null,228        "created_at": "2025-02-14T06:20:06.248Z",229        "last_posted_at": "2025-02-14T06:20:06.324Z",230        "bumped": true,231        "bumped_at": "2025-02-14T07:33:32.589Z",232        "archetype": "regular",233        "unseen": false,234        "pinned": false,235        "unpinned": null,236        "visible": true,237        "closed": false,238        "archived": false,239        "bookmarked": null,240        "liked": null,241        "tags_descriptions": {},242        "like_count": 1,243        "views": 128,244        "category_id": 12,245        "featured_link": null,246        "has_accepted_answer": false,247        "posters": [248          {249            "extras": "latest single",250            "description": "Original Poster, Most Recent Poster",251            "user": {252              "id": 80391,253              "username": "huiwy",254              "name": "Gary Hui",255              "avatar_template": "/user_avatar/discuss.pytorch.org/huiwy/{size}/73482_2.png",256              "trust_level": 1257            }258          }259        ]260      },261      {262        "fancy_title": "Will doing two times forward and backward work fine?",263        "id": 218388,264        "title": "Will doing two times forward and backward work fine?",265        "slug": "will-doing-two-times-forward-and-backward-work-fine",266        "posts_count": 2,267        "reply_count": 0,268        "highest_post_number": 2,269        "image_url": null,270        "created_at": "2025-03-29T03:56:38.060Z",271        "last_posted_at": "2025-03-29T23:29:13.394Z",272        "bumped": true,273        "bumped_at": "2025-03-29T23:29:13.394Z",274        "archetype": "regular",275        "unseen": false,276        "pinned": false,277        "unpinned": null,278        "visible": true,279        "closed": false,280        "archived": false,281        "bookmarked": null,282        "liked": null,283        "tags_descriptions": {},284        "like_count": 1,285        "views": 40,286        "category_id": 12,287        "featured_link": null,288        "has_accepted_answer": true,289        "posters": [290          {291            "extras": null,292            "description": "Original Poster",293            "user": {294              "id": 23879,295              "username": "chener",296              "name": "chener",297              "avatar_template": "/user_avatar/discuss.pytorch.org/chener/{size}/17159_2.png",298              "trust_level": 1299            }300          },301          {302            "extras": "latest",303            "description": "Most Recent Poster, Accepted Answer",304            "user": {305              "id": 18088,306              "username": "KFrank",307              "name": "K. Frank",308              "avatar_template": "/letter_avatar_proxy/v4/letter/k/ecb155/{size}.png",309              "trust_level": 2310            }311          }312        ]313      },314      {315        "fancy_title": "How do I run torch.distributed between Docker containers on separate instances using the bridge network?",316        "id": 215208,317        "title": "How do I run torch.distributed between Docker containers on separate instances using the bridge network?",318        "slug": "how-do-i-run-torch-distributed-between-docker-containers-on-separate-instances-using-the-bridge-network",319        "posts_count": 1,320        "reply_count": 0,321        "highest_post_number": 1,322        "image_url": null,323        "created_at": "2025-01-10T14:23:42.298Z",324        "last_posted_at": "2025-01-10T14:23:42.339Z",325        "bumped": true,326        "bumped_at": "2025-01-10T14:23:42.339Z",327        "archetype": "regular",328        "unseen": false,329        "pinned": false,330        "unpinned": null,331        "visible": true,332        "closed": false,333        "archived": false,334        "bookmarked": null,335        "liked": null,336        "tags_descriptions": {},337        "like_count": 0,338        "views": 77,339        "category_id": 12,340        "featured_link": null,341        "has_accepted_answer": false,342        "posters": [343          {344            "extras": "latest single",345            "description": "Original Poster, Most Recent Poster",346            "user": {347              "id": 81981,348              "username": "jaydsolanki20",349              "name": "Jay Solanki",350              "avatar_template": "/letter_avatar_proxy/v4/letter/j/48db29/{size}.png",351              "trust_level": 0352            }353          }354        ]355      },356      {357        "fancy_title": "How to correctly use model weights outside of forward in distributed training set-up with DDP?",358        "id": 212892,359        "title": "How to correctly use model weights outside of forward in distributed training set-up with DDP?",360        "slug": "how-to-correctly-use-model-weights-outside-of-forward-in-distributed-training-set-up-with-ddp",361        "posts_count": 1,362        "reply_count": 0,363        "highest_post_number": 1,364        "image_url": null,365        "created_at": "2024-11-12T21:59:06.136Z",366        "last_posted_at": "2024-11-12T21:59:06.186Z",367        "bumped": true,368        "bumped_at": "2024-11-12T21:59:06.186Z",369        "archetype": "regular",370        "unseen": false,371        "pinned": false,372        "unpinned": null,373        "visible": true,374        "closed": false,375        "archived": false,376        "bookmarked": null,377        "liked": null,378        "tags_descriptions": {},379        "like_count": 0,380        "views": 28,381        "category_id": 12,382        "featured_link": null,383        "has_accepted_answer": false,384        "posters": [385          {386            "extras": "latest single",387            "description": "Original Poster, Most Recent Poster",388            "user": {389              "id": 80869,390              "username": "marg.hovo",391              "name": "",392              "avatar_template": "/user_avatar/discuss.pytorch.org/marg.hovo/{size}/73965_2.png",393              "trust_level": 1394            }395          }396        ]397      },398      {399        "fancy_title": "How works dist.ProcessGroupGloo?",400        "id": 218549,401        "title": "How works dist.ProcessGroupGloo?",402        "slug": "how-works-dist-processgroupgloo",403        "posts_count": 1,404        "reply_count": 0,405        "highest_post_number": 1,406        "image_url": null,407        "created_at": "2025-04-02T17:52:31.775Z",408        "last_posted_at": "2025-04-02T17:52:31.867Z",409        "bumped": true,410        "bumped_at": "2025-04-03T11:08:25.733Z",411        "archetype": "regular",412        "unseen": false,413        "pinned": false,414        "unpinned": null,415        "visible": true,416        "closed": false,417        "archived": false,418        "bookmarked": null,419        "liked": null,420        "tags_descriptions": {},421        "like_count": 0,422        "views": 38,423        "category_id": 12,424        "featured_link": null,425        "has_accepted_answer": false,426        "posters": [427          {428            "extras": "latest single",429            "description": "Original Poster, Most Recent Poster",430            "user": {431              "id": 80983,432              "username": "HariSeldon11988",433              "name": "",434              "avatar_template": "/letter_avatar_proxy/v4/letter/h/9dc877/{size}.png",435              "trust_level": 1436            }437          }438        ]439      }440    ],441    "tags_descriptions": {},442    "fancy_title": "DistributedDataParallel do not work with custom function in model",443    "id": 61631,444    "title": "DistributedDataParallel do not work with custom function in model",445    "posts_count": 3,446    "created_at": "2019-11-20T16:35:41.948Z",447    "views": 548,448    "reply_count": 1,449    "like_count": 0,450    "last_posted_at": "2019-11-29T15:21:30.023Z",451    "visible": true,452    "closed": false,453    "archived": false,454    "has_summary": false,455    "archetype": "regular",456    "slug": "distributeddataparallel-do-not-work-with-custom-function-in-model",457    "category_id": 12,458    "word_count": 185,459    "deleted_at": null,460    "user_id": 22803,461    "featured_link": null,462    "pinned_globally": false,463    "pinned_at": null,464    "pinned_until": null,465    "image_url": null,466    "slow_mode_seconds": 0,467    "draft": null,468    "draft_key": "topic_61631",469    "draft_sequence": null,470    "unpinned": null,471    "pinned": false,472    "current_post_number": 1,473    "highest_post_number": 3,474    "deleted_by": null,475    "actions_summary": [476      {477        "id": 4,478        "count": 0,479        "hidden": false,480        "can_act": false481      },482      {483        "id": 8,484        "count": 0,485        "hidden": false,486        "can_act": false487      },488      {489        "id": 10,490        "count": 0,491        "hidden": false,492        "can_act": false493      },494      {495        "id": 7,496        "count": 0,497        "hidden": false,498        "can_act": false499      }500    ],501    "chunk_size": 20,502    "bookmarked": false,503    "topic_timer": null,504    "message_bus_last_id": 0,505    "participant_count": 2,506    "show_read_indicator": false,507    "thumbnails": null,508    "slow_mode_enabled_until": null,509    "can_vote": false,510    "vote_count": 0,511    "user_voted": false,512    "discourse_zendesk_plugin_zendesk_id": null,513    "discourse_zendesk_plugin_zendesk_url": "https://your-url.zendesk.com/agent/tickets/",514    "details": {515      "can_edit": false,516      "notification_level": 1,517      "participants": [518        {519          "id": 22803,520          "username": "hadaev8",521          "name": "Had",522          "avatar_template": "/user_avatar/discuss.pytorch.org/hadaev8/{size}/16280_2.png",523          "post_count": 2,524          "primary_group_name": null,525          "flair_name": null,526          "flair_url": null,527          "flair_color": null,528          "flair_bg_color": null,529          "flair_group_id": null,530          "trust_level": 2531        },532        {533          "id": 18862,534          "username": "pritamdamania87",535          "name": "Pritamdamania87",536          "avatar_template": "/user_avatar/discuss.pytorch.org/pritamdamania87/{size}/28891_2.png",537          "post_count": 1,538          "primary_group_name": null,539          "flair_name": null,540          "flair_url": null,541          "flair_color": null,542          "flair_bg_color": null,543          "flair_group_id": null,544          "trust_level": 2545        }546      ],547      "created_by": {548        "id": 22803,549        "username": "hadaev8",550        "name": "Had",551        "avatar_template": "/user_avatar/discuss.pytorch.org/hadaev8/{size}/16280_2.png"552      },553      "last_poster": {554        "id": 22803,555        "username": "hadaev8",556        "name": "Had",557        "avatar_template": "/user_avatar/discuss.pytorch.org/hadaev8/{size}/16280_2.png"558      },559      "links": [560        {561          "url": "https://colab.research.google.com/drive/104LtQ1zIioIOMQEPgVve77m5Rd4Gm0wU",562          "title": null,563          "internal": false,564          "attachment": false,565          "reflection": false,566          "clicks": 10,567          "user_id": 22803,568          "domain": "colab.research.google.com",569          "root_domain": "google.com"570        }571      ]572    },573    "bookmarks": []574  },575  {576    "post_stream": {577      "posts": [578        {579          "id": 149094,580          "name": "",581          "username": "NoreOxford",582          "avatar_template": "/user_avatar/discuss.pytorch.org/noreoxford/{size}/18205_2.png",583          "created_at": "2019-11-27T15:08:09.577Z",584          "cooked": "<p>I have searched through many stack overflow and <a href=\"http://pytorch.org\" rel=\"nofollow noopener\">pytorch.org</a> forum threads about this, it seems to be an common error. However, the solutions I read in these threads are difficult to follow and I couldn’t utilise the solutions to make my code work. I do understand it has something to do with the tensor size being fed into the model. However, I’m not exactly sure how to modify the code I have to fix this. I am still new to pytorch so I cannot really understand the explanations I found that well. I am trying to use a bi-directional LSTM found on this pytorch tutorial (<a href=\"https://github.com/yunjey/pytorch-tutorial/blob/master/tutorials/02-intermediate/bidirectional_recurrent_neural_network/main.py\" rel=\"nofollow noopener\">https://github.com/yunjey/pytorch-tutorial/blob/master/tutorials/02-intermediate/bidirectional_recurrent_neural_network/main.py</a>). It uses the MNIST image dataset but I am trying to use a financial text dataset instead. I think this is where the problem occurs, I know text and images probably require something different, but I’m not sure what to modify. I included a function for a dataloader as well.</p>\n<pre><code class=\"lang-auto\">def dataloader(messages, labels, sequence_length=30, batch_size=32, shuffle=False):\n    \"\"\" \n    Build a dataloader.\n    \"\"\"\n    if shuffle:\n        indices = list(range(len(messages)))\n        random.shuffle(indices)\n        messages = [messages[idx] for idx in indices]\n        labels = [labels[idx] for idx in indices]\n\n    total_sequences = len(messages) #total number of twits\n\n    for ii in range(0, total_sequences, batch_size):\n        batch_messages = messages[ii: ii+batch_size]\n        \n        # First initialize a tensor of all zeros\n        batch = torch.zeros((sequence_length, len(batch_messages)), dtype=torch.int64)\n        for batch_num, tokens in enumerate(batch_messages):\n            token_tensor = torch.tensor(tokens)\n            # Left pad!\n            start_idx = max(sequence_length - len(token_tensor), 0) #returns 0 is len(token_tensor) &gt; seqeuence_length\n            batch[start_idx:, batch_num] = token_tensor[:sequence_length] #replace each row in batch with the token\n        \n        label_tensor = torch.tensor(labels[ii: ii+len(batch_messages)])\n        \n        yield batch, label_tensor\n</code></pre>\n<pre><code class=\"lang-auto\">device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')\n\n# Hyper-parameters\nsequence_length = 28\ninput_size = 28\nhidden_size = 128\nnum_layers = 2\nnum_classes = 3\nbatch_size = 100\nnum_epochs = 2\nlearning_rate = 0.003\n\n# Bidirectional recurrent neural network (many-to-one)\nclass BiRNN(nn.Module):\n\n    def __init__(self, input_size, hidden_size, num_layers, num_classes):\n        super(BiRNN, self).__init__()\n        self.hidden_size = hidden_size\n        self.num_layers = num_layers\n        self.lstm = nn.LSTM(input_size, hidden_size, num_layers, batch_first=True, bidirectional=True)\n        self.fc = nn.Linear(hidden_size*2, num_classes)  # 2 for bidirection\n  \n\n    def forward(self, x):\n        # Set initial states\n        h0 = torch.zeros(self.num_layers*2, x.size(0), self.hidden_size).to(device) # 2 for bidirection \n        c0 = torch.zeros(self.num_layers*2, x.size(0), self.hidden_size).to(device)        \n\n        # Forward propagate LSTM\n        out, _ = self.lstm(x, (h0, c0))  # out: tensor of shape (batch_size, seq_length, hidden_size*2)        \n\n        # Decode the hidden state of the last time step\n        out = self.fc(out[:, -1, :])\n \n        return out\n\n\nmodel_2 = BiRNN(input_size, hidden_size, num_layers, num_classes).to(device)\n\n# Loss and optimizer\ncriterion = nn.CrossEntropyLoss()\noptimizer = torch.optim.Adam(model_2.parameters(), lr=learning_rate)\n</code></pre>\n<pre><code class=\"lang-auto\">train_loader = dataloader(\n            train_features, train_labels, batch_size=batch_size, sequence_length=20, shuffle=True)\n\n# Train the model\ntotal_step = 200\n\nfor epoch in range(num_epochs):\n    \n    for i, (text_batch, labels) in enumerate(train_loader):\n        text_batch = text_batch.to(device)\n        labels = labels.to(device)\n\n        # Forward pass\n        outputs = model_2(text_batch)\n        loss = criterion(outputs, labels)        \n\n        # Backward and optimize\n        optimizer.zero_grad()\n        loss.backward()\n        optimizer.step()\n\n        \n\n        if (i+1) % 100 == 0:\n            print ('Epoch [{}/{}], Step [{}/{}], Loss: {:.4f}' \n                   .format(epoch+1, num_epochs, i+1, total_step, loss.item()))\n</code></pre>\n<p>And here is the full error:</p>\n<pre><code class=\"lang-auto\">---------------------------------------------------------------------------\nRuntimeError                              Traceback (most recent call last)\n&lt;ipython-input-74-8a935e97b39c&gt; in &lt;module&gt;\n     10 \n     11         # Forward pass\n---&gt; 12         outputs = model_2(text_batch)\n     13         loss = criterion(outputs, labels)\n     14 \n\n~\\Anaconda3\\envs\\thesis\\lib\\site-packages\\torch\\nn\\modules\\module.py in __call__(self, *input, **kwargs)\n    545             result = self._slow_forward(*input, **kwargs)\n    546         else:\n--&gt; 547             result = self.forward(*input, **kwargs)\n    548         for hook in self._forward_hooks.values():\n    549             hook_result = hook(self, input, result)\n\n&lt;ipython-input-64-21fa163d5c93&gt; in forward(self, x)\n     18 \n     19         # Forward propagate LSTM\n---&gt; 20         out, _ = self.lstm(x, (h0, c0))  # out: tensor of shape (batch_size, seq_length, hidden_size*2)\n     21 \n     22         # Decode the hidden state of the last time step\n\n~\\Anaconda3\\envs\\thesis\\lib\\site-packages\\torch\\nn\\modules\\module.py in __call__(self, *input, **kwargs)\n    545             result = self._slow_forward(*input, **kwargs)\n    546         else:\n--&gt; 547             result = self.forward(*input, **kwargs)\n    548         for hook in self._forward_hooks.values():\n    549             hook_result = hook(self, input, result)\n\n~\\Anaconda3\\envs\\thesis\\lib\\site-packages\\torch\\nn\\modules\\rnn.py in forward(self, input, hx)\n    562             return self.forward_packed(input, hx)\n    563         else:\n--&gt; 564             return self.forward_tensor(input, hx)\n    565 \n    566 class GRU(RNNBase):\n\n~\\Anaconda3\\envs\\thesis\\lib\\site-packages\\torch\\nn\\modules\\rnn.py in forward_tensor(self, input, hx)\n    541         unsorted_indices = None\n    542 \n--&gt; 543         output, hidden = self.forward_impl(input, hx, batch_sizes, max_batch_size, sorted_indices)\n    544 \n    545         return output, self.permute_hidden(hidden, unsorted_indices)\n\n~\\Anaconda3\\envs\\thesis\\lib\\site-packages\\torch\\nn\\modules\\rnn.py in forward_impl(self, input, hx, batch_sizes, max_batch_size, sorted_indices)\n    521             hx = self.permute_hidden(hx, sorted_indices)\n    522 \n--&gt; 523         self.check_forward_args(input, hx, batch_sizes)\n    524         if batch_sizes is None:\n    525             result = _VF.lstm(input, hx, self._get_flat_weights(), self.bias, self.num_layers,\n\n~\\Anaconda3\\envs\\thesis\\lib\\site-packages\\torch\\nn\\modules\\rnn.py in check_forward_args(self, input, hidden, batch_sizes)\n    494     def check_forward_args(self, input, hidden, batch_sizes):\n    495         # type: (Tensor, Tuple[Tensor, Tensor], Optional[Tensor]) -&gt; None\n--&gt; 496         self.check_input(input, batch_sizes)\n    497         expected_hidden_size = self.get_expected_hidden_size(input, batch_sizes)\n    498 \n\n~\\Anaconda3\\envs\\thesis\\lib\\site-packages\\torch\\nn\\modules\\rnn.py in check_input(self, input, batch_sizes)\n    143             raise RuntimeError(\n    144                 'input must have {} dimensions, got {}'.format(\n--&gt; 145                     expected_input_dim, input.dim()))\n    146         if self.input_size != input.size(-1):\n    147             raise RuntimeError(\n\nRuntimeError: input must have 3 dimensions, got 2\n</code></pre>",585          "post_number": 1,586          "post_type": 1,587          "posts_count": 7,588          "updated_at": "2019-11-27T15:39:46.277Z",589          "reply_count": 0,590          "reply_to_post_number": null,591          "quote_count": 0,592          "incoming_link_count": 2788,593          "reads": 68,594          "readers_count": 67,595          "score": 13938.6,596          "yours": false,597          "topic_id": 62319,598          "topic_slug": "cannot-figure-out-error-runtimeerror-input-must-have-3-dimensions-got-2",599          "display_username": "",600          "primary_group_name": null,601          "flair_name": null,602          "flair_url": null,603          "flair_bg_color": null,604          "flair_color": null,605          "flair_group_id": null,606          "badges_granted": [],607          "version": 3,608          "can_edit": false,609          "can_delete": false,610          "can_recover": false,611          "can_see_hidden_post": false,612          "can_wiki": false,613          "link_counts": [614            {615              "url": "https://github.com/yunjey/pytorch-tutorial/blob/master/tutorials/02-intermediate/bidirectional_recurrent_neural_network/main.py",616              "internal": false,617              "reflection": false,618              "title": "pytorch-tutorial/main.py at master · yunjey/pytorch-tutorial · GitHub",619              "clicks": 10620            },621            {622              "url": "http://pytorch.org",623              "internal": false,624              "reflection": false,625              "clicks": 0626            }627          ],628          "read": true,629          "user_title": null,630          "bookmarked": false,631          "actions_summary": [],632          "moderator": false,633          "admin": false,634          "staff": false,635          "user_id": 24884,636          "hidden": false,637          "trust_level": 1,638          "deleted_at": null,639          "user_deleted": false,640          "edit_reason": null,641          "can_view_edit_history": true,642          "wiki": false,643          "post_url": "/t/cannot-figure-out-error-runtimeerror-input-must-have-3-dimensions-got-2/62319/1",644          "can_accept_answer": false,645          "can_unaccept_answer": false,646          "accepted_answer": false,647          "topic_accepted_answer": null,648          "can_vote": false649        },650        {651          "id": 149196,652          "name": "",653          "username": "ptrblck",654          "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",655          "created_at": "2019-11-28T00:57:55.040Z",656          "cooked": "<p>The linked code reshapes the input to:</p>\n<pre><code class=\"lang-python\">images = images.reshape(-1, sequence_length, input_size).to(device)\n</code></pre>\n<p>, to create an input tensor of <code>[batch_size, seq_len, nb_features]</code>.<br>\nIn the MNIST example, <code>sequence_length</code> and <code>input_size</code> are both defines as <code>28</code>, which will basically slice the image and fake the temporal dimension.</p>\n<p>I’m not sure, what kind of data you are using, but you should also reshape (or load) the data in the same format.<br>\nApparently you are passing the data as a 2-dimensional tensor (probably <code>[batch_size, nb_features]</code>).</p>",657          "post_number": 2,658          "post_type": 1,659          "posts_count": 7,660          "updated_at": "2019-11-28T00:57:55.040Z",661          "reply_count": 1,662          "reply_to_post_number": null,663          "quote_count": 0,664          "incoming_link_count": 14,665          "reads": 57,666          "readers_count": 56,667          "score": 86.4,668          "yours": false,669          "topic_id": 62319,670          "topic_slug": "cannot-figure-out-error-runtimeerror-input-must-have-3-dimensions-got-2",671          "display_username": "",672          "primary_group_name": null,673          "flair_name": null,674          "flair_url": null,675          "flair_bg_color": null,676          "flair_color": null,677          "flair_group_id": null,678          "badges_granted": [],679          "version": 1,680          "can_edit": false,681          "can_delete": false,682          "can_recover": false,683          "can_see_hidden_post": false,684          "can_wiki": false,685          "read": true,686          "user_title": "",687          "bookmarked": false,688          "actions_summary": [],689          "moderator": true,690          "admin": true,691          "staff": true,692          "user_id": 3534,693          "hidden": false,694          "trust_level": 2,695          "deleted_at": null,696          "user_deleted": false,697          "edit_reason": null,698          "can_view_edit_history": true,699          "wiki": false,700          "post_url": "/t/cannot-figure-out-error-runtimeerror-input-must-have-3-dimensions-got-2/62319/2",701          "can_accept_answer": false,702          "can_unaccept_answer": false,703          "accepted_answer": false,704          "topic_accepted_answer": null705        },706        {707          "id": 149215,708          "name": "",709          "username": "NoreOxford",710          "avatar_template": "/user_avatar/discuss.pytorch.org/noreoxford/{size}/18205_2.png",711          "created_at": "2019-11-28T05:21:51.724Z",712          "cooked": "<p>Thank you, that makes sense. I will try to figure it out when I get back to my computer. So I just have to change the parameters of the reshape method like this:</p>\n<pre><code class=\"lang-auto\">images = images.reshape(batch_size, nb_features).to(device)\n</code></pre>\n<p>correct? Thanks again!</p>",713          "post_number": 3,714          "post_type": 1,715          "posts_count": 7,716          "updated_at": "2019-11-28T05:21:51.724Z",717          "reply_count": 1,718          "reply_to_post_number": 2,719          "quote_count": 0,720          "incoming_link_count": 3,721          "reads": 53,722          "readers_count": 52,723          "score": 30.6,724          "yours": false,725          "topic_id": 62319,726          "topic_slug": "cannot-figure-out-error-runtimeerror-input-must-have-3-dimensions-got-2",727          "display_username": "",728          "primary_group_name": null,729          "flair_name": null,730          "flair_url": null,731          "flair_bg_color": null,732          "flair_color": null,733          "flair_group_id": null,734          "badges_granted": [],735          "version": 1,736          "can_edit": false,737          "can_delete": false,738          "can_recover": false,739          "can_see_hidden_post": false,740          "can_wiki": false,741          "read": true,742          "user_title": null,743          "reply_to_user": {744            "id": 3534,745            "username": "ptrblck",746            "name": "",747            "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png"748          },749          "bookmarked": false,750          "actions_summary": [],751          "moderator": false,752          "admin": false,753          "staff": false,754          "user_id": 24884,755          "hidden": false,756          "trust_level": 1,757          "deleted_at": null,758          "user_deleted": false,759          "edit_reason": null,760          "can_view_edit_history": true,761          "wiki": false,762          "post_url": "/t/cannot-figure-out-error-runtimeerror-input-must-have-3-dimensions-got-2/62319/3",763          "can_accept_answer": false,764          "can_unaccept_answer": false,765          "accepted_answer": false,766          "topic_accepted_answer": null767        },768        {769          "id": 149220,770          "name": "",771          "username": "ptrblck",772          "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",773          "created_at": "2019-11-28T06:01:39.081Z",774          "cooked": "<p>No, you would need to add a temporal dimension, as you are using an RNN afterwards.<br>\nI’m not sure how your data is defined, but I assume you are working with some kind of temporal data, which contains features for each time step?</p>",775          "post_number": 4,776          "post_type": 1,777          "posts_count": 7,778          "updated_at": "2019-11-28T06:01:39.081Z",779          "reply_count": 0,780          "reply_to_post_number": 3,781          "quote_count": 0,782          "incoming_link_count": 2,783          "reads": 49,784          "readers_count": 48,785          "score": 19.8,786          "yours": false,787          "topic_id": 62319,788          "topic_slug": "cannot-figure-out-error-runtimeerror-input-must-have-3-dimensions-got-2",789          "display_username": "",790          "primary_group_name": null,791          "flair_name": null,792          "flair_url": null,793          "flair_bg_color": null,794          "flair_color": null,795          "flair_group_id": null,796          "badges_granted": [],797          "version": 1,798          "can_edit": false,799          "can_delete": false,800          "can_recover": false,801          "can_see_hidden_post": false,802          "can_wiki": false,803          "read": true,804          "user_title": "",805          "reply_to_user": {806            "id": 24884,807            "username": "NoreOxford",808            "name": "",809            "avatar_template": "/user_avatar/discuss.pytorch.org/noreoxford/{size}/18205_2.png"810          },811          "bookmarked": false,812          "actions_summary": [],813          "moderator": true,814          "admin": true,815          "staff": true,816          "user_id": 3534,817          "hidden": false,818          "trust_level": 2,819          "deleted_at": null,820          "user_deleted": false,821          "edit_reason": null,822          "can_view_edit_history": true,823          "wiki": false,824          "post_url": "/t/cannot-figure-out-error-runtimeerror-input-must-have-3-dimensions-got-2/62319/4",825          "can_accept_answer": false,826          "can_unaccept_answer": false,827          "accepted_answer": false,828          "topic_accepted_answer": null829        },830        {831          "id": 149271,832          "name": "",833          "username": "NoreOxford",834          "avatar_template": "/user_avatar/discuss.pytorch.org/noreoxford/{size}/18205_2.png",835          "created_at": "2019-11-28T10:11:57.669Z",836          "cooked": "<p>No, there’s no temporal information in my data. It’s just sentences with a sentiment score. I processed/cleaned/tokenised the sentences and the sentiment score is also in integers so the features are just a list of numeric arrays, each array corresponding to a sentence and the labels is just a list of integers.</p>\n<p>Edit: Just an update, I forgot that I did notice that the original author had reshaped the images tensor. However, I removed the reshape in my code. I have tried multiple ways of rewriting the code but it always comes back to needing a dimension of 3 when my input is 2. Even when I take the reshape part out completely, modify the forward pass, it still says requires 3. Here’s what I tried to do to modify the forward pass:</p>\n<pre><code class=\"lang-auto\">def forward(self, x):\n        # Set initial states\n        h0 = torch.zeros(self.num_layers*2, x.size(0), self.hidden_size).to(device) # 2 for bidirection \n        #c0 = torch.zeros(self.num_layers*2, x.size(0), self.hidden_size).to(device)        \n        print('input size', x.size())\n        # Forward propagate LSTM\n        #x = x.view(-1, input_size)\n        out, _ = self.lstm(x, h0)  # out: tensor of shape (batch_size, seq_length, hidden_size*2)        \n        print('lstm size', out.size())\n        \n        # Decode the hidden state of the last time step\n        out = self.fc(out)\n        print('lstm size reshaped final',  out.size())\n        logps = self.log_softmax(out)\n        return logps\n</code></pre>\n<p>I guess what I am trying to figure out is where in the code does it first require the dimensions to be 3, so I can change that. Thanks!</p>",837          "post_number": 5,838          "post_type": 1,839          "posts_count": 7,840          "updated_at": "2019-11-28T14:55:37.466Z",841          "reply_count": 1,842          "reply_to_post_number": null,843          "quote_count": 0,844          "incoming_link_count": 15,845          "reads": 42,846          "readers_count": 41,847          "score": 88.4,848          "yours": false,849          "topic_id": 62319,850          "topic_slug": "cannot-figure-out-error-runtimeerror-input-must-have-3-dimensions-got-2",851          "display_username": "",852          "primary_group_name": null,853          "flair_name": null,854          "flair_url": null,855          "flair_bg_color": null,856          "flair_color": null,857          "flair_group_id": null,858          "badges_granted": [],859          "version": 3,860          "can_edit": false,861          "can_delete": false,862          "can_recover": false,863          "can_see_hidden_post": false,864          "can_wiki": false,865          "read": true,866          "user_title": null,867          "bookmarked": false,868          "actions_summary": [],869          "moderator": false,870          "admin": false,871          "staff": false,872          "user_id": 24884,873          "hidden": false,874          "trust_level": 1,875          "deleted_at": null,876          "user_deleted": false,877          "edit_reason": null,878          "can_view_edit_history": true,879          "wiki": false,880          "post_url": "/t/cannot-figure-out-error-runtimeerror-input-must-have-3-dimensions-got-2/62319/5",881          "can_accept_answer": false,882          "can_unaccept_answer": false,883          "accepted_answer": false,884          "topic_accepted_answer": null885        },886        {887          "id": 149369,888          "name": "",889          "username": "ptrblck",890          "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",891          "created_at": "2019-11-28T19:46:18.754Z",892          "cooked": "<aside class=\"quote no-group\" data-username=\"NoreOxford\" data-post=\"5\" data-topic=\"62319\">\n<div class=\"title\">\n<div class=\"quote-controls\"></div>\n<img loading=\"lazy\" alt=\"\" width=\"24\" height=\"24\" src=\"https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/noreoxford/48/18205_2.png\" class=\"avatar\"> NoreOxford:</div>\n<blockquote>\n<p>No, there’s no temporal information in my data. It’s just sentences with a sentiment score.</p>\n</blockquote>\n</aside>\n<p>If you are dealing with “sequences”, it sounds like a temporal dimension.<br>\nHow else are these samples ordered, if not along a timeline?<br>\nIf you don’t have temporal information, I would assume you don’t need the <code>nn.LSTM</code> in your model and just remove the reshaping etc.</p>\n<aside class=\"quote no-group\" data-username=\"NoreOxford\" data-post=\"5\" data-topic=\"62319\">\n<div class=\"title\">\n<div class=\"quote-controls\"></div>\n<img loading=\"lazy\" alt=\"\" width=\"24\" height=\"24\" src=\"https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/noreoxford/48/18205_2.png\" class=\"avatar\"> NoreOxford:</div>\n<blockquote>\n<p>I guess what I am trying to figure out is where in the code does it first require the dimensions to be 3, so I can change that.</p>\n</blockquote>\n</aside>\n<p>The <code>nn.LSTM</code> requires three dimensions as <code>[batch_size, seq_len, nb_features]</code> (if <code>batch_first=True</code> as in your code snippet).</p>",893          "post_number": 6,894          "post_type": 1,895          "posts_count": 7,896          "updated_at": "2019-11-28T19:47:21.590Z",897          "reply_count": 1,898          "reply_to_post_number": 5,899          "quote_count": 1,900          "incoming_link_count": 20,901          "reads": 32,902          "readers_count": 31,903          "score": 111.4,904          "yours": false,905          "topic_id": 62319,906          "topic_slug": "cannot-figure-out-error-runtimeerror-input-must-have-3-dimensions-got-2",907          "display_username": "",908          "primary_group_name": null,909          "flair_name": null,910          "flair_url": null,911          "flair_bg_color": null,912          "flair_color": null,913          "flair_group_id": null,914          "badges_granted": [],915          "version": 1,916          "can_edit": false,917          "can_delete": false,918          "can_recover": false,919          "can_see_hidden_post": false,920          "can_wiki": false,921          "read": true,922          "user_title": "",923          "bookmarked": false,924          "actions_summary": [],925          "moderator": true,926          "admin": true,927          "staff": true,928          "user_id": 3534,929          "hidden": false,930          "trust_level": 2,931          "deleted_at": null,932          "user_deleted": false,933          "edit_reason": null,934          "can_view_edit_history": true,935          "wiki": false,936          "post_url": "/t/cannot-figure-out-error-runtimeerror-input-must-have-3-dimensions-got-2/62319/6",937          "can_accept_answer": false,938          "can_unaccept_answer": false,939          "accepted_answer": false,940          "topic_accepted_answer": null941        },942        {943          "id": 149481,944          "name": "",945          "username": "NoreOxford",946          "avatar_template": "/user_avatar/discuss.pytorch.org/noreoxford/{size}/18205_2.png",947          "created_at": "2019-11-29T13:41:55.510Z",948          "cooked": "<p>Ah okay, yes I understand what you mean by temporal now. I tried setting batch_first=False but it still requires 3 dimensions. Is there anyway to change the model to require only 2 dimensions and if not, how would you make text data have 3 dimensions? Thanks again for all your help!</p>",949          "post_number": 7,950          "post_type": 1,951          "posts_count": 7,952          "updated_at": "2019-11-29T13:41:55.510Z",953          "reply_count": 0,954          "reply_to_post_number": 6,955          "quote_count": 0,956          "incoming_link_count": 11,957          "reads": 27,958          "readers_count": 26,959          "score": 60.4,960          "yours": false,961          "topic_id": 62319,962          "topic_slug": "cannot-figure-out-error-runtimeerror-input-must-have-3-dimensions-got-2",963          "display_username": "",964          "primary_group_name": null,965          "flair_name": null,966          "flair_url": null,967          "flair_bg_color": null,968          "flair_color": null,969          "flair_group_id": null,970          "badges_granted": [],971          "version": 1,972          "can_edit": false,973          "can_delete": false,974          "can_recover": false,975          "can_see_hidden_post": false,976          "can_wiki": false,977          "read": true,978          "user_title": null,979          "reply_to_user": {980            "id": 3534,981            "username": "ptrblck",982            "name": "",983            "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png"984          },985          "bookmarked": false,986          "actions_summary": [],987          "moderator": false,988          "admin": false,989          "staff": false,990          "user_id": 24884,991          "hidden": false,992          "trust_level": 1,993          "deleted_at": null,994          "user_deleted": false,995          "edit_reason": null,996          "can_view_edit_history": true,997          "wiki": false,998          "post_url": "/t/cannot-figure-out-error-runtimeerror-input-must-have-3-dimensions-got-2/62319/7",999          "can_accept_answer": false,1000          "can_unaccept_answer": false,1001          "accepted_answer": false,1002          "topic_accepted_answer": null1003        }1004      ],1005      "stream": [1006        149094,1007        149196,1008        149215,1009        149220,1010        149271,1011        149369,1012        1494811013      ]1014    },1015    "timeline_lookup": [1016      [1017        1,1018        21591019      ],1020      [1021        6,1022        21581023      ],1024      [1025        7,1026        21571027      ]1028    ],1029    "suggested_topics": [1030      {1031        "fancy_title": "Why is custom RNN implementation so slow?",1032        "id": 213168,1033        "title": "Why is custom RNN implementation so slow?",1034        "slug": "why-is-custom-rnn-implementation-so-slow",1035        "posts_count": 6,1036        "reply_count": 4,1037        "highest_post_number": 6,1038        "image_url": null,1039        "created_at": "2024-11-19T19:27:11.458Z",1040        "last_posted_at": "2024-11-23T01:41:42.810Z",1041        "bumped": true,1042        "bumped_at": "2024-11-23T01:41:42.810Z",1043        "archetype": "regular",1044        "unseen": false,1045        "pinned": false,1046        "unpinned": null,1047        "visible": true,1048        "closed": false,1049        "archived": false,1050        "bookmarked": null,1051        "liked": null,1052        "tags_descriptions": {},1053        "like_count": 3,1054        "views": 219,1055        "category_id": 1,1056        "featured_link": null,1057        "has_accepted_answer": false,1058        "posters": [1059          {1060            "extras": null,1061            "description": "Original Poster",1062            "user": {1063              "id": 81008,1064              "username": "omnomc",1065              "name": "",1066              "avatar_template": "/user_avatar/discuss.pytorch.org/omnomc/{size}/74086_2.png",1067              "trust_level": 11068            }1069          },1070          {1071            "extras": null,1072            "description": "Frequent Poster",1073            "user": {1074              "id": 3534,1075              "username": "ptrblck",1076              "name": "",1077              "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",1078              "admin": true,1079              "moderator": true,1080              "trust_level": 21081            }1082          },1083          {1084            "extras": "latest",1085            "description": "Most Recent Poster",1086            "user": {1087              "id": 41458,1088              "username": "J_Johnson",1089              "name": "J Johnson",1090              "avatar_template": "/user_avatar/discuss.pytorch.org/j_johnson/{size}/55494_2.png",1091              "trust_level": 21092            }1093          }1094        ]1095      },1096      {1097        "fancy_title": "Problem in Backpropagation through a sample in Beta distribution in pytorch",1098        "id": 215599,1099        "title": "Problem in Backpropagation through a sample in Beta distribution in pytorch",1100        "slug": "problem-in-backpropagation-through-a-sample-in-beta-distribution-in-pytorch",1101        "posts_count": 2,1102        "reply_count": 0,1103        "highest_post_number": 2,1104        "image_url": null,1105        "created_at": "2025-01-19T16:54:31.198Z",1106        "last_posted_at": "2025-01-19T17:14:39.424Z",1107        "bumped": true,1108        "bumped_at": "2025-01-19T17:14:39.424Z",1109        "archetype": "regular",1110        "unseen": false,1111        "pinned": false,1112        "unpinned": null,1113        "visible": true,1114        "closed": false,1115        "archived": false,1116        "bookmarked": null,1117        "liked": null,1118        "tags_descriptions": {},1119        "like_count": 0,1120        "views": 99,1121        "category_id": 1,1122        "featured_link": null,1123        "has_accepted_answer": true,1124        "posters": [1125          {1126            "extras": "latest single",1127            "description": "Original Poster, Most Recent Poster, Accepted Answer",1128            "user": {1129              "id": 37790,1130              "username": "Jimut123",1131              "name": "Jimut Bahan Pal",1132              "avatar_template": "/user_avatar/discuss.pytorch.org/jimut123/{size}/29864_2.png",1133              "trust_level": 11134            }1135          }1136        ]1137      },1138      {1139        "fancy_title": "Replace torch.rfft() code (PyTorch 1.6)",1140        "id": 216169,1141        "title": "Replace torch.rfft() code (PyTorch 1.6)",1142        "slug": "replace-torch-rfft-code-pytorch-1-6",1143        "posts_count": 3,1144        "reply_count": 0,1145        "highest_post_number": 3,1146        "image_url": null,1147        "created_at": "2025-02-03T09:19:15.576Z",1148        "last_posted_at": "2025-02-03T15:14:25.123Z",1149        "bumped": true,1150        "bumped_at": "2025-02-03T15:14:25.123Z",1151        "archetype": "regular",1152        "unseen": false,1153        "pinned": false,1154        "unpinned": null,1155        "visible": true,1156        "closed": false,1157        "archived": false,1158        "bookmarked": null,1159        "liked": null,1160        "tags_descriptions": {},1161        "like_count": 0,1162        "views": 274,1163        "category_id": 1,1164        "featured_link": null,1165        "has_accepted_answer": true,1166        "posters": [1167          {1168            "extras": null,1169            "description": "Original Poster, Accepted Answer",1170            "user": {1171              "id": 36526,1172              "username": "ptrch_c_m",1173              "name": null,1174              "avatar_template": "/letter_avatar_proxy/v4/letter/p/e274bd/{size}.png",1175              "trust_level": 11176            }1177          },1178          {1179            "extras": "latest",1180            "description": "Most Recent Poster",1181            "user": {1182              "id": 19553,1183              "username": "anantguptadbl",1184              "name": "Anant Gupta",1185              "avatar_template": "/user_avatar/discuss.pytorch.org/anantguptadbl/{size}/17784_2.png",1186              "trust_level": 21187            }1188          }1189        ]1190      },1191      {1192        "fancy_title": "Custom kernels for Intel GPUs",1193        "id": 214471,1194        "title": "Custom kernels for Intel GPUs",1195        "slug": "custom-kernels-for-intel-gpus",1196        "posts_count": 7,1197        "reply_count": 4,1198        "highest_post_number": 7,1199        "image_url": null,1200        "created_at": "2024-12-20T20:49:12.270Z",

Showing the first 1,200 of 67247 lines. Download the file for the rest.