CoolFace
Datasetpublic

Anurag1734/cuda-error-resolution-analysis

sourceHugging Faceupdated 2mo agoView on Hugging Face
0likes7downloads
topics_batch_578.json61067 linesDownload Raw Back to raw
1[2  {3    "post_stream": {4      "posts": [5        {6          "id": 125600,7          "name": "Antonio Mendoza",8          "username": "eltoto1219",9          "avatar_template": "/letter_avatar_proxy/v4/letter/e/ecb155/{size}.png",10          "created_at": "2019-07-26T13:19:07.776Z",11          "cooked": "<p>Hello,</p>\n<p>I am making a VQA model with co-attention with Y adaptive image features (10-100).  To calculate the co attention,  I first project my question (batch * q_len  * q_Dim) to  (batch * q_len  * new_dim)</p>\n<p>Then I have the following for loop which i project each one of my image features (Y * feature_dim) to (Y * new_dim)</p>\n<pre><code class=\"lang-auto\">    def attn_weights(self, q2, v2, n_objs):\n        batch_size = n_objs.size(0)\n        weights = torch.zeros(batch_size, self.max_objs, 1).to(self.device)\n\n\n        q_proj = self.q_proj(q2)\n        for i in range(batch_size): \n            n_i = int(n_objs[i].item()) ### number of objects for the ith image in batchk\n            v_i = v2[i] ## the ith image in batch\n            v_i = v_i[:n_i-1, :] ## selecting number of object in image\n            v_i = self.v_proj(v_i) ## projecting feature dim to new_dim\n            q_i = q_proj[i] ## the ith question in batch\n            fusion = v_i * q_i.repeat(n_i-1 ,1) ## repeat the question Y times\n            fusion = self.dropout(fusion)\n            scores = self.linear(fusion)\n            att_weights = softmax(scores, 0)\n            weights[i, :n_i -1] = att_weights \n        return weights\n\n</code></pre>\n<p>During training this causes CUDA’s memory usage to sky rocket. I have checked the nvidia-smi and this function alone causes 14113MiB / 15079MiB of memory to be used.</p>\n<p>This is the error I have received:</p>\n<pre><code class=\"lang-auto\">  File \"main.py\", line 181, in &lt;module&gt;\n    main()\n  File \"main.py\", line 166, in main\n    run(mod, train_loader, optimizer, train=[], prefix='train', epoch=i)\n  File \"main.py\", line 79, in run\n    loss.backward()\n  File \"/opt/anaconda3/lib/python3.7/site-packages/torch/tensor.py\", line 107, in backward\n    torch.autograd.backward(self, gradient, retain_graph, create_graph)\n  File \"/opt/anaconda3/lib/python3.7/site-packages/torch/autograd/__init__.py\", line 93, in backward\n    allow_unreachable=True)  # allow_unreachable flag\nRuntimeError: CUDA out of memory. Tried to allocate 1.43 GiB (GPU 0; 14.73 GiB total capacity; 8.45 GiB already allocated; 1.04 GiB free; 4.54 GiB cached)\n\n</code></pre>\n<p>Is there a reason why this is happening, and is there a known way around this? If nn.Linear layers are not supposed to be called in a for loop, my next question would be how to project the Y image features for every image in the batch (Y * feature_dim) to (Y * new_dim) where the batch dimension looks like (batch * 100 * feature_dim) to ( batch * 100 * new_dim) where everything after the Y image features (100 - Y) would be zero padded without the zero padding affecting the gradient of the projection.</p>\n<p>Any help would be greatly appreciated!</p>",12          "post_number": 1,13          "post_type": 1,14          "posts_count": 2,15          "updated_at": "2019-07-26T13:23:20.899Z",16          "reply_count": 0,17          "reply_to_post_number": null,18          "quote_count": 0,19          "incoming_link_count": 432,20          "reads": 23,21          "readers_count": 22,22          "score": 2164.6,23          "yours": false,24          "topic_id": 51723,25          "topic_slug": "using-nn-linear-inside-a-for-loop-causes-cuda-to-run-out-of-memory",26          "display_username": "Antonio Mendoza",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          "read": true,41          "user_title": null,42          "bookmarked": false,43          "actions_summary": [],44          "moderator": false,45          "admin": false,46          "staff": false,47          "user_id": 21007,48          "hidden": false,49          "trust_level": 1,50          "deleted_at": null,51          "user_deleted": false,52          "edit_reason": null,53          "can_view_edit_history": true,54          "wiki": false,55          "post_url": "/t/using-nn-linear-inside-a-for-loop-causes-cuda-to-run-out-of-memory/51723/1",56          "can_accept_answer": false,57          "can_unaccept_answer": false,58          "accepted_answer": false,59          "topic_accepted_answer": true,60          "can_vote": false61        },62        {63          "id": 125660,64          "name": "Juan Montesinos",65          "username": "JuanFMontesinos",66          "avatar_template": "/user_avatar/discuss.pytorch.org/juanfmontesinos/{size}/76115_2.png",67          "created_at": "2019-07-26T23:11:29.195Z",68          "cooked": "<p>Hi,  nn.linear work with an arbitrary amount of dimensions, namely you can pass whatever tensor of size BATCH,<em>,dim yo obtain BATCH,</em>,new_dim.</p>\n<p>Never do for loops in pytorch as it is equivalent to generate Siamese modules. It duplicates the computational graph as many times as you call the module.</p>\n<p>If you would like to do something similar (linear is spatial as you can pass arbitrary dimensions) the proper way is squeezing everything into the BATCH dimension</p>",69          "post_number": 2,70          "post_type": 1,71          "posts_count": 2,72          "updated_at": "2019-07-27T23:58:52.529Z",73          "reply_count": 0,74          "reply_to_post_number": null,75          "quote_count": 0,76          "incoming_link_count": 1,77          "reads": 16,78          "readers_count": 15,79          "score": 23.2,80          "yours": false,81          "topic_id": 51723,82          "topic_slug": "using-nn-linear-inside-a-for-loop-causes-cuda-to-run-out-of-memory",83          "display_username": "Juan Montesinos",84          "primary_group_name": null,85          "flair_name": null,86          "flair_url": null,87          "flair_bg_color": null,88          "flair_color": null,89          "flair_group_id": null,90          "badges_granted": [],91          "version": 1,92          "can_edit": false,93          "can_delete": false,94          "can_recover": false,95          "can_see_hidden_post": false,96          "can_wiki": false,97          "read": true,98          "user_title": "",99          "bookmarked": false,100          "actions_summary": [101            {102              "id": 2,103              "count": 1104            }105          ],106          "moderator": false,107          "admin": false,108          "staff": false,109          "user_id": 9081,110          "hidden": false,111          "trust_level": 2,112          "deleted_at": null,113          "user_deleted": false,114          "edit_reason": null,115          "can_view_edit_history": true,116          "wiki": false,117          "post_url": "/t/using-nn-linear-inside-a-for-loop-causes-cuda-to-run-out-of-memory/51723/2",118          "can_accept_answer": false,119          "can_unaccept_answer": false,120          "accepted_answer": true,121          "topic_accepted_answer": true122        }123      ],124      "stream": [125        125600,126        125660127      ]128    },129    "timeline_lookup": [130      [131        1,132        2283133      ]134    ],135    "suggested_topics": [136      {137        "fancy_title": "Initializating parameter with registered parametrization",138        "id": 212563,139        "title": "Initializating parameter with registered parametrization",140        "slug": "initializating-parameter-with-registered-parametrization",141        "posts_count": 3,142        "reply_count": 1,143        "highest_post_number": 3,144        "image_url": null,145        "created_at": "2024-11-05T17:08:17.858Z",146        "last_posted_at": "2024-11-05T22:33:46.499Z",147        "bumped": true,148        "bumped_at": "2024-11-05T22:33:46.499Z",149        "archetype": "regular",150        "unseen": false,151        "pinned": false,152        "unpinned": null,153        "visible": true,154        "closed": false,155        "archived": false,156        "bookmarked": null,157        "liked": null,158        "tags_descriptions": {},159        "like_count": 0,160        "views": 176,161        "category_id": 1,162        "featured_link": null,163        "has_accepted_answer": false,164        "posters": [165          {166            "extras": "latest",167            "description": "Original Poster, Most Recent Poster",168            "user": {169              "id": 67433,170              "username": "octave",171              "name": "Octave",172              "avatar_template": "/letter_avatar_proxy/v4/letter/o/f05b48/{size}.png",173              "trust_level": 1174            }175          },176          {177            "extras": null,178            "description": "Frequent Poster",179            "user": {180              "id": 3534,181              "username": "ptrblck",182              "name": "",183              "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",184              "admin": true,185              "moderator": true,186              "trust_level": 2187            }188          }189        ]190      },191      {192        "fancy_title": "Getting std::bad_alloc when loading the python tradined model in c++",193        "id": 212797,194        "title": "Getting std::bad_alloc when loading the python tradined model in c++",195        "slug": "getting-std-bad-alloc-when-loading-the-python-tradined-model-in-c",196        "posts_count": 1,197        "reply_count": 0,198        "highest_post_number": 1,199        "image_url": "https://discuss.pytorch.org/uploads/default/optimized/3X/4/c/4c64351ba5b8b679193c4d58afeb8bedb34260ab_2_1024x361.jpeg",200        "created_at": "2024-11-11T09:35:50.204Z",201        "last_posted_at": "2024-11-11T09:35:50.257Z",202        "bumped": true,203        "bumped_at": "2024-11-11T10:11:12.646Z",204        "archetype": "regular",205        "unseen": false,206        "pinned": false,207        "unpinned": null,208        "visible": true,209        "closed": false,210        "archived": false,211        "bookmarked": null,212        "liked": null,213        "tags_descriptions": {},214        "like_count": 0,215        "views": 80,216        "category_id": 1,217        "featured_link": null,218        "has_accepted_answer": false,219        "posters": [220          {221            "extras": "latest single",222            "description": "Original Poster, Most Recent Poster",223            "user": {224              "id": 80818,225              "username": "Naseef",226              "name": "Naseef",227              "avatar_template": "/user_avatar/discuss.pytorch.org/naseef/{size}/73911_2.png",228              "trust_level": 0229            }230          }231        ]232      },233      {234        "fancy_title": "F.cross_entropy unexpectedly slower than F.log_softmax + torch.gather",235        "id": 213425,236        "title": "F.cross_entropy unexpectedly slower than F.log_softmax + torch.gather",237        "slug": "f-cross-entropy-unexpectedly-slower-than-f-log-softmax-torch-gather",238        "posts_count": 2,239        "reply_count": 0,240        "highest_post_number": 2,241        "image_url": null,242        "created_at": "2024-11-25T21:27:40.120Z",243        "last_posted_at": "2024-11-25T22:36:33.756Z",244        "bumped": true,245        "bumped_at": "2024-11-25T22:36:33.756Z",246        "archetype": "regular",247        "unseen": false,248        "pinned": false,249        "unpinned": null,250        "visible": true,251        "closed": false,252        "archived": false,253        "bookmarked": null,254        "liked": null,255        "tags_descriptions": {},256        "like_count": 1,257        "views": 44,258        "category_id": 1,259        "featured_link": null,260        "has_accepted_answer": false,261        "posters": [262          {263            "extras": null,264            "description": "Original Poster",265            "user": {266              "id": 40732,267              "username": "normster",268              "name": "Norman Mu",269              "avatar_template": "/user_avatar/discuss.pytorch.org/normster/{size}/33059_2.png",270              "trust_level": 1271            }272          },273          {274            "extras": "latest",275            "description": "Most Recent Poster",276            "user": {277              "id": 3534,278              "username": "ptrblck",279              "name": "",280              "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",281              "admin": true,282              "moderator": true,283              "trust_level": 2284            }285          }286        ]287      },288      {289        "fancy_title": "Is torch2.4.1 compatible with CUDA12.5",290        "id": 213511,291        "title": "Is torch2.4.1 compatible with CUDA12.5",292        "slug": "is-torch2-4-1-compatible-with-cuda12-5",293        "posts_count": 4,294        "reply_count": 0,295        "highest_post_number": 5,296        "image_url": null,297        "created_at": "2024-11-27T11:34:39.926Z",298        "last_posted_at": "2024-11-27T13:50:34.682Z",299        "bumped": true,300        "bumped_at": "2024-11-27T13:50:34.682Z",301        "archetype": "regular",302        "unseen": false,303        "pinned": false,304        "unpinned": null,305        "visible": true,306        "closed": false,307        "archived": false,308        "bookmarked": null,309        "liked": null,310        "visibility_reason_id": 1,311        "tags_descriptions": {},312        "like_count": 0,313        "views": 290,314        "category_id": 1,315        "featured_link": null,316        "has_accepted_answer": false,317        "posters": [318          {319            "extras": null,320            "description": "Original Poster",321            "user": {322              "id": 81160,323              "username": "Pied-Piper1",324              "name": "Paradox",325              "avatar_template": "/user_avatar/discuss.pytorch.org/pied-piper1/{size}/74224_2.png",326              "trust_level": 0327            }328          },329          {330            "extras": null,331            "description": "Frequent Poster",332            "user": {333              "id": -1,334              "username": "system",335              "name": "system",336              "avatar_template": "/uploads/default/original/2X/3/38d28fd067a1a8f263e14507942b2e38e49b771a.png",337              "admin": true,338              "moderator": true,339              "trust_level": 4340            }341          },342          {343            "extras": "latest",344            "description": "Most Recent Poster",345            "user": {346              "id": 3534,347              "username": "ptrblck",348              "name": "",349              "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",350              "admin": true,351              "moderator": true,352              "trust_level": 2353            }354          }355        ]356      },357      {358        "fancy_title": "FlexAttention with sparse edge bias",359        "id": 216376,360        "title": "FlexAttention with sparse edge bias",361        "slug": "flexattention-with-sparse-edge-bias",362        "posts_count": 1,363        "reply_count": 0,364        "highest_post_number": 1,365        "image_url": null,366        "created_at": "2025-02-07T18:02:41.974Z",367        "last_posted_at": "2025-02-07T18:02:42.019Z",368        "bumped": true,369        "bumped_at": "2025-02-07T18:02:42.019Z",370        "archetype": "regular",371        "unseen": false,372        "pinned": false,373        "unpinned": null,374        "visible": true,375        "closed": false,376        "archived": false,377        "bookmarked": null,378        "liked": null,379        "tags_descriptions": {},380        "like_count": 0,381        "views": 92,382        "category_id": 1,383        "featured_link": null,384        "has_accepted_answer": false,385        "posters": [386          {387            "extras": "latest single",388            "description": "Original Poster, Most Recent Poster",389            "user": {390              "id": 82551,391              "username": "mbaranov",392              "name": "Max Baranov",393              "avatar_template": "/letter_avatar_proxy/v4/letter/m/76d3ee/{size}.png",394              "trust_level": 0395            }396          }397        ]398      }399    ],400    "tags_descriptions": {},401    "fancy_title": "Using nn.Linear inside a for loop causes CUDA to run out of memory",402    "id": 51723,403    "title": "Using nn.Linear inside a for loop causes CUDA to run out of memory",404    "posts_count": 2,405    "created_at": "2019-07-26T13:19:07.728Z",406    "views": 1140,407    "reply_count": 0,408    "like_count": 1,409    "last_posted_at": "2019-07-26T23:11:29.195Z",410    "visible": true,411    "closed": false,412    "archived": false,413    "has_summary": false,414    "archetype": "regular",415    "slug": "using-nn-linear-inside-a-for-loop-causes-cuda-to-run-out-of-memory",416    "category_id": 1,417    "word_count": 479,418    "deleted_at": null,419    "user_id": 21007,420    "featured_link": null,421    "pinned_globally": false,422    "pinned_at": null,423    "pinned_until": null,424    "image_url": null,425    "slow_mode_seconds": 0,426    "draft": null,427    "draft_key": "topic_51723",428    "draft_sequence": null,429    "unpinned": null,430    "pinned": false,431    "current_post_number": 1,432    "highest_post_number": 2,433    "deleted_by": null,434    "actions_summary": [435      {436        "id": 4,437        "count": 0,438        "hidden": false,439        "can_act": false440      },441      {442        "id": 8,443        "count": 0,444        "hidden": false,445        "can_act": false446      },447      {448        "id": 10,449        "count": 0,450        "hidden": false,451        "can_act": false452      },453      {454        "id": 7,455        "count": 0,456        "hidden": false,457        "can_act": false458      }459    ],460    "chunk_size": 20,461    "bookmarked": false,462    "topic_timer": null,463    "message_bus_last_id": 0,464    "participant_count": 2,465    "show_read_indicator": false,466    "thumbnails": null,467    "slow_mode_enabled_until": null,468    "accepted_answer": {469      "post_number": 2,470      "username": "JuanFMontesinos",471      "name": "Juan Montesinos",472      "excerpt": "Hi,  nn.linear work with an arbitrary amount of dimensions, namely you can pass whatever tensor of size BATCH,,dim yo obtain BATCH,,new_dim. \nNever do for loops in pytorch as it is equivalent to generate Siamese modules. It duplicates the computational graph as many times as you call the module. \nIf&hellip;"473    },474    "can_vote": false,475    "vote_count": 0,476    "user_voted": false,477    "discourse_zendesk_plugin_zendesk_id": null,478    "discourse_zendesk_plugin_zendesk_url": "https://your-url.zendesk.com/agent/tickets/",479    "details": {480      "can_edit": false,481      "notification_level": 1,482      "participants": [483        {484          "id": 9081,485          "username": "JuanFMontesinos",486          "name": "Juan Montesinos",487          "avatar_template": "/user_avatar/discuss.pytorch.org/juanfmontesinos/{size}/76115_2.png",488          "post_count": 1,489          "primary_group_name": null,490          "flair_name": null,491          "flair_url": null,492          "flair_color": null,493          "flair_bg_color": null,494          "flair_group_id": null,495          "trust_level": 2496        },497        {498          "id": 21007,499          "username": "eltoto1219",500          "name": "Antonio Mendoza",501          "avatar_template": "/letter_avatar_proxy/v4/letter/e/ecb155/{size}.png",502          "post_count": 1,503          "primary_group_name": null,504          "flair_name": null,505          "flair_url": null,506          "flair_color": null,507          "flair_bg_color": null,508          "flair_group_id": null,509          "trust_level": 1510        }511      ],512      "created_by": {513        "id": 21007,514        "username": "eltoto1219",515        "name": "Antonio Mendoza",516        "avatar_template": "/letter_avatar_proxy/v4/letter/e/ecb155/{size}.png"517      },518      "last_poster": {519        "id": 9081,520        "username": "JuanFMontesinos",521        "name": "Juan Montesinos",522        "avatar_template": "/user_avatar/discuss.pytorch.org/juanfmontesinos/{size}/76115_2.png"523      }524    },525    "bookmarks": []526  },527  {528    "post_stream": {529      "posts": [530        {531          "id": 125043,532          "name": "Zhaoyi Yan",533          "username": "Zhaoyi-Yan",534          "avatar_template": "/user_avatar/discuss.pytorch.org/zhaoyi-yan/{size}/8480_2.png",535          "created_at": "2019-07-24T00:55:12.435Z",536          "cooked": "<pre><code class=\"lang-python\">import torch\na = (torch.rand(3,4)*10).long()\nprint(a)\nprint(a*0.9)\n</code></pre>\n<p>Output:</p>\n<pre><code class=\"lang-bash\">tensor([[8, 5, 3, 4],\n        [1, 3, 6, 7],\n        [8, 5, 8, 8]])\ntensor([[0, 0, 0, 0],\n        [0, 0, 0, 0],\n        [0, 0, 0, 0]])\n</code></pre>",537          "post_number": 1,538          "post_type": 1,539          "posts_count": 2,540          "updated_at": "2019-07-24T00:55:12.435Z",541          "reply_count": 0,542          "reply_to_post_number": null,543          "quote_count": 0,544          "incoming_link_count": 12,545          "reads": 8,546          "readers_count": 7,547          "score": 61.6,548          "yours": false,549          "topic_id": 51440,550          "topic_slug": "bug-or-feature-for-longtensor",551          "display_username": "Zhaoyi Yan",552          "primary_group_name": null,553          "flair_name": null,554          "flair_url": null,555          "flair_bg_color": null,556          "flair_color": null,557          "flair_group_id": null,558          "badges_granted": [],559          "version": 1,560          "can_edit": false,561          "can_delete": false,562          "can_recover": false,563          "can_see_hidden_post": false,564          "can_wiki": false,565          "read": true,566          "user_title": null,567          "bookmarked": false,568          "actions_summary": [],569          "moderator": false,570          "admin": false,571          "staff": false,572          "user_id": 13822,573          "hidden": false,574          "trust_level": 2,575          "deleted_at": null,576          "user_deleted": false,577          "edit_reason": null,578          "can_view_edit_history": true,579          "wiki": false,580          "post_url": "/t/bug-or-feature-for-longtensor/51440/1",581          "can_accept_answer": false,582          "can_unaccept_answer": false,583          "accepted_answer": false,584          "topic_accepted_answer": null,585          "can_vote": false586        },587        {588          "id": 125654,589          "name": "Prerna Dhareshwar",590          "username": "Prerna_Dhareshwar",591          "avatar_template": "/user_avatar/discuss.pytorch.org/prerna_dhareshwar/{size}/14256_2.png",592          "created_at": "2019-07-26T22:44:12.689Z",593          "cooked": "<p>Hi,</p>\n<p>I don’t think thats a bug, it tries to retain the type of the tensor as long hence the rounding of 0.9 to 0.</p>",594          "post_number": 2,595          "post_type": 1,596          "posts_count": 2,597          "updated_at": "2019-07-26T22:44:12.689Z",598          "reply_count": 0,599          "reply_to_post_number": null,600          "quote_count": 0,601          "incoming_link_count": 1,602          "reads": 7,603          "readers_count": 6,604          "score": 6.4,605          "yours": false,606          "topic_id": 51440,607          "topic_slug": "bug-or-feature-for-longtensor",608          "display_username": "Prerna Dhareshwar",609          "primary_group_name": null,610          "flair_name": null,611          "flair_url": null,612          "flair_bg_color": null,613          "flair_color": null,614          "flair_group_id": null,615          "badges_granted": [],616          "version": 1,617          "can_edit": false,618          "can_delete": false,619          "can_recover": false,620          "can_see_hidden_post": false,621          "can_wiki": false,622          "read": true,623          "user_title": null,624          "bookmarked": false,625          "actions_summary": [],626          "moderator": false,627          "admin": false,628          "staff": false,629          "user_id": 20203,630          "hidden": false,631          "trust_level": 2,632          "deleted_at": null,633          "user_deleted": false,634          "edit_reason": null,635          "can_view_edit_history": true,636          "wiki": false,637          "post_url": "/t/bug-or-feature-for-longtensor/51440/2",638          "can_accept_answer": false,639          "can_unaccept_answer": false,640          "accepted_answer": false,641          "topic_accepted_answer": null642        }643      ],644      "stream": [645        125043,646        125654647      ]648    },649    "timeline_lookup": [650      [651        1,652        2286653      ],654      [655        2,656        2283657      ]658    ],659    "suggested_topics": [660      {661        "fancy_title": "Rtx 5090 Error creating song: CUDA error: no kernel image is available for execution on the device Compile with TORCH_USE_CUDA_DSA to enable device-side assertions",662        "id": 217438,663        "title": "Rtx 5090 Error creating song: CUDA error: no kernel image is available for execution on the device Compile with TORCH_USE_CUDA_DSA to enable device-side assertions",664        "slug": "rtx-5090-error-creating-song-cuda-error-no-kernel-image-is-available-for-execution-on-the-device-compile-with-torch-use-cuda-dsa-to-enable-device-side-assertions",665        "posts_count": 13,666        "reply_count": 6,667        "highest_post_number": 13,668        "image_url": null,669        "created_at": "2025-03-04T19:28:56.622Z",670        "last_posted_at": "2025-03-07T01:41:04.241Z",671        "bumped": true,672        "bumped_at": "2025-03-07T01:41:04.241Z",673        "archetype": "regular",674        "unseen": false,675        "pinned": false,676        "unpinned": null,677        "visible": true,678        "closed": false,679        "archived": false,680        "bookmarked": null,681        "liked": null,682        "tags_descriptions": {},683        "like_count": 0,684        "views": 547,685        "category_id": 1,686        "featured_link": null,687        "has_accepted_answer": false,688        "posters": [689          {690            "extras": null,691            "description": "Original Poster",692            "user": {693              "id": 83067,694              "username": "nafe_alhmdan",695              "name": "nafe alhmdan",696              "avatar_template": "/user_avatar/discuss.pytorch.org/nafe_alhmdan/{size}/75984_2.png",697              "trust_level": 1698            }699          },700          {701            "extras": null,702            "description": "Frequent Poster",703            "user": {704              "id": 3534,705              "username": "ptrblck",706              "name": "",707              "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",708              "admin": true,709              "moderator": true,710              "trust_level": 2711            }712          },713          {714            "extras": null,715            "description": "Frequent Poster",716            "user": {717              "id": 9081,718              "username": "JuanFMontesinos",719              "name": "Juan Montesinos",720              "avatar_template": "/user_avatar/discuss.pytorch.org/juanfmontesinos/{size}/76115_2.png",721              "trust_level": 2722            }723          },724          {725            "extras": "latest",726            "description": "Most Recent Poster",727            "user": {728              "id": 83074,729              "username": "Noah_Jang",730              "name": "",731              "avatar_template": "/letter_avatar_proxy/v4/letter/n/858c86/{size}.png",732              "trust_level": 1733            }734          }735        ]736      },737      {738        "fancy_title": "Dropout design choice",739        "id": 214984,740        "title": "Dropout design choice",741        "slug": "dropout-design-choice",742        "posts_count": 2,743        "reply_count": 0,744        "highest_post_number": 2,745        "image_url": null,746        "created_at": "2025-01-05T00:07:45.968Z",747        "last_posted_at": "2025-01-05T19:33:48.026Z",748        "bumped": true,749        "bumped_at": "2025-01-05T19:33:48.026Z",750        "archetype": "regular",751        "unseen": false,752        "pinned": false,753        "unpinned": null,754        "visible": true,755        "closed": false,756        "archived": false,757        "bookmarked": null,758        "liked": null,759        "tags_descriptions": {},760        "like_count": 0,761        "views": 135,762        "category_id": 1,763        "featured_link": null,764        "has_accepted_answer": false,765        "posters": [766          {767            "extras": null,768            "description": "Original Poster",769            "user": {770              "id": 77182,771              "username": "Siddhanth_Ramani",772              "name": "Siddhanth Ramani",773              "avatar_template": "/user_avatar/discuss.pytorch.org/siddhanth_ramani/{size}/62072_2.png",774              "trust_level": 1775            }776          },777          {778            "extras": "latest",779            "description": "Most Recent Poster",780            "user": {781              "id": 3534,782              "username": "ptrblck",783              "name": "",784              "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",785              "admin": true,786              "moderator": true,787              "trust_level": 2788            }789          }790        ]791      },792      {793        "fancy_title": "Licensing for PyTorch Word Usage in Books",794        "id": 215808,795        "title": "Licensing for PyTorch Word Usage in Books",796        "slug": "licensing-for-pytorch-word-usage-in-books",797        "posts_count": 10,798        "reply_count": 7,799        "highest_post_number": 10,800        "image_url": null,801        "created_at": "2025-01-24T07:25:14.106Z",802        "last_posted_at": "2025-01-28T07:02:20.511Z",803        "bumped": true,804        "bumped_at": "2025-01-28T07:02:20.511Z",805        "archetype": "regular",806        "unseen": false,807        "pinned": false,808        "unpinned": null,809        "visible": true,810        "closed": false,811        "archived": false,812        "bookmarked": null,813        "liked": null,814        "tags_descriptions": {},815        "like_count": 0,816        "views": 96,817        "category_id": 1,818        "featured_link": null,819        "has_accepted_answer": false,820        "posters": [821          {822            "extras": "latest",823            "description": "Original Poster, Most Recent Poster",824            "user": {825              "id": 82282,826              "username": "orangeeducationpvt",827              "name": "Orange Education Pvt Ltd",828              "avatar_template": "/letter_avatar_proxy/v4/letter/o/97f17d/{size}.png",829              "trust_level": 0830            }831          },832          {833            "extras": null,834            "description": "Frequent Poster",835            "user": {836              "id": 3534,837              "username": "ptrblck",838              "name": "",839              "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",840              "admin": true,841              "moderator": true,842              "trust_level": 2843            }844          },845          {846            "extras": null,847            "description": "Frequent Poster",848            "user": {849              "id": 75469,850              "username": "Matt_White",851              "name": "Matt White",852              "avatar_template": "/user_avatar/discuss.pytorch.org/matt_white/{size}/69693_2.png",853              "admin": true,854              "trust_level": 1855            }856          }857        ]858      },859      {860        "fancy_title": "Problem with inpainting Stable Diffusion and python",861        "id": 216995,862        "title": "Problem with inpainting Stable Diffusion and python",863        "slug": "problem-with-inpainting-stable-diffusion-and-python",864        "posts_count": 1,865        "reply_count": 0,866        "highest_post_number": 1,867        "image_url": "https://discuss.pytorch.org/uploads/default/original/3X/3/1/31f1fcf366294f3565f157c4ce276c65d68f3ac0.jpeg",868        "created_at": "2025-02-21T16:06:56.775Z",869        "last_posted_at": "2025-02-21T16:06:56.814Z",870        "bumped": true,871        "bumped_at": "2025-02-21T16:06:56.814Z",872        "archetype": "regular",873        "unseen": false,874        "pinned": false,875        "unpinned": null,876        "visible": true,877        "closed": false,878        "archived": false,879        "bookmarked": null,880        "liked": null,881        "tags_descriptions": {},882        "like_count": 0,883        "views": 111,884        "category_id": 1,885        "featured_link": null,886        "has_accepted_answer": false,887        "posters": [888          {889            "extras": "latest single",890            "description": "Original Poster, Most Recent Poster",891            "user": {892              "id": 82738,893              "username": "Dmitr",894              "name": "",895              "avatar_template": "/letter_avatar_proxy/v4/letter/d/13edae/{size}.png",896              "trust_level": 1897            }898          }899        ]900      },901      {902        "fancy_title": "Rtx 5090 Error with nightly cu128 install",903        "id": 217478,904        "title": "Rtx 5090 Error with nightly cu128 install",905        "slug": "rtx-5090-error-with-nightly-cu128-install",906        "posts_count": 8,907        "reply_count": 2,908        "highest_post_number": 8,909        "image_url": null,910        "created_at": "2025-03-05T14:19:51.454Z",911        "last_posted_at": "2025-04-02T01:18:02.963Z",912        "bumped": true,913        "bumped_at": "2025-04-02T01:18:02.963Z",914        "archetype": "regular",915        "unseen": false,916        "pinned": false,917        "unpinned": null,918        "visible": true,919        "closed": false,920        "archived": false,921        "bookmarked": null,922        "liked": null,923        "tags_descriptions": {},924        "like_count": 0,925        "views": 5032,926        "category_id": 1,927        "featured_link": null,928        "has_accepted_answer": false,929        "posters": [930          {931            "extras": null,932            "description": "Original Poster",933            "user": {934              "id": 83084,935              "username": "Marked",936              "name": "Marked",937              "avatar_template": "/user_avatar/discuss.pytorch.org/marked/{size}/74882_2.png",938              "trust_level": 1939            }940          },941          {942            "extras": null,943            "description": "Frequent Poster",944            "user": {945              "id": 83067,946              "username": "nafe_alhmdan",947              "name": "nafe alhmdan",948              "avatar_template": "/user_avatar/discuss.pytorch.org/nafe_alhmdan/{size}/75984_2.png",949              "trust_level": 1950            }951          },952          {953            "extras": null,954            "description": "Frequent Poster",955            "user": {956              "id": 3534,957              "username": "ptrblck",958              "name": "",959              "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",960              "admin": true,961              "moderator": true,962              "trust_level": 2963            }964          },965          {966            "extras": "latest",967            "description": "Most Recent Poster",968            "user": {969              "id": 83583,970              "username": "randscott",971              "name": "",972              "avatar_template": "/letter_avatar_proxy/v4/letter/r/7ba0ec/{size}.png",973              "trust_level": 0974            }975          }976        ]977      }978    ],979    "tags_descriptions": {},980    "fancy_title": "Bug or feature for longTensor?",981    "id": 51440,982    "title": "Bug or feature for longTensor?",983    "posts_count": 2,984    "created_at": "2019-07-24T00:55:12.381Z",985    "views": 348,986    "reply_count": 0,987    "like_count": 0,988    "last_posted_at": "2019-07-26T22:44:12.689Z",989    "visible": true,990    "closed": false,991    "archived": false,992    "has_summary": false,993    "archetype": "regular",994    "slug": "bug-or-feature-for-longtensor",995    "category_id": 1,996    "word_count": 71,997    "deleted_at": null,998    "user_id": 13822,999    "featured_link": null,1000    "pinned_globally": false,1001    "pinned_at": null,1002    "pinned_until": null,1003    "image_url": null,1004    "slow_mode_seconds": 0,1005    "draft": null,1006    "draft_key": "topic_51440",1007    "draft_sequence": null,1008    "unpinned": null,1009    "pinned": false,1010    "current_post_number": 1,1011    "highest_post_number": 2,1012    "deleted_by": null,1013    "actions_summary": [1014      {1015        "id": 4,1016        "count": 0,1017        "hidden": false,1018        "can_act": false1019      },1020      {1021        "id": 8,1022        "count": 0,1023        "hidden": false,1024        "can_act": false1025      },1026      {1027        "id": 10,1028        "count": 0,1029        "hidden": false,1030        "can_act": false1031      },1032      {1033        "id": 7,1034        "count": 0,1035        "hidden": false,1036        "can_act": false1037      }1038    ],1039    "chunk_size": 20,1040    "bookmarked": false,1041    "topic_timer": null,1042    "message_bus_last_id": 0,1043    "participant_count": 2,1044    "show_read_indicator": false,1045    "thumbnails": null,1046    "slow_mode_enabled_until": null,1047    "can_vote": false,1048    "vote_count": 0,1049    "user_voted": false,1050    "discourse_zendesk_plugin_zendesk_id": null,1051    "discourse_zendesk_plugin_zendesk_url": "https://your-url.zendesk.com/agent/tickets/",1052    "details": {1053      "can_edit": false,1054      "notification_level": 1,1055      "participants": [1056        {1057          "id": 13822,1058          "username": "Zhaoyi-Yan",1059          "name": "Zhaoyi Yan",1060          "avatar_template": "/user_avatar/discuss.pytorch.org/zhaoyi-yan/{size}/8480_2.png",1061          "post_count": 1,1062          "primary_group_name": null,1063          "flair_name": null,1064          "flair_url": null,1065          "flair_color": null,1066          "flair_bg_color": null,1067          "flair_group_id": null,1068          "trust_level": 21069        },1070        {1071          "id": 20203,1072          "username": "Prerna_Dhareshwar",1073          "name": "Prerna Dhareshwar",1074          "avatar_template": "/user_avatar/discuss.pytorch.org/prerna_dhareshwar/{size}/14256_2.png",1075          "post_count": 1,1076          "primary_group_name": null,1077          "flair_name": null,1078          "flair_url": null,1079          "flair_color": null,1080          "flair_bg_color": null,1081          "flair_group_id": null,1082          "trust_level": 21083        }1084      ],1085      "created_by": {1086        "id": 13822,1087        "username": "Zhaoyi-Yan",1088        "name": "Zhaoyi Yan",1089        "avatar_template": "/user_avatar/discuss.pytorch.org/zhaoyi-yan/{size}/8480_2.png"1090      },1091      "last_poster": {1092        "id": 20203,1093        "username": "Prerna_Dhareshwar",1094        "name": "Prerna Dhareshwar",1095        "avatar_template": "/user_avatar/discuss.pytorch.org/prerna_dhareshwar/{size}/14256_2.png"1096      }1097    },1098    "bookmarks": []1099  },1100  {1101    "post_stream": {1102      "posts": [1103        {1104          "id": 125038,1105          "name": "mohammad",1106          "username": "mmdbrdrn",1107          "avatar_template": "/user_avatar/discuss.pytorch.org/mmdbrdrn/{size}/9966_2.png",1108          "created_at": "2019-07-23T22:57:22.365Z",1109          "cooked": "<p>Hello every one.</p>\n<p>I am working on video processing and as data samples, i need short video clips (around 10 frame per each).<br>\nI have a dataset, composed of consecutive images, and what i want to do is combining consecutive 10 frames to make a cuboid. Now the problem is: for big datasets or even for multiple normal datasets, when i create numpy arrays containing plenty of cuboids (10 * 227* 227 : 10 frames of size 227*227), the Computer RAM gets fully occupied and kernel dies!!</p>\n<p>Maybe my algorithm has a bad mistake and i am unaware of a simple way, but i would be haapy if anyone give me useful hints to manage my RAM</p>\n<p>Thank you very much</p>",1110          "post_number": 1,1111          "post_type": 1,1112          "posts_count": 5,1113          "updated_at": "2019-07-23T22:59:56.252Z",1114          "reply_count": 0,1115          "reply_to_post_number": null,1116          "quote_count": 0,1117          "incoming_link_count": 485,1118          "reads": 33,1119          "readers_count": 32,1120          "score": 2426.6,1121          "yours": false,1122          "topic_id": 51437,1123          "topic_slug": "how-to-manage-ram-capacity-while-loading-dataloader-in-deep-learning",1124          "display_username": "mohammad",1125          "primary_group_name": null,1126          "flair_name": null,1127          "flair_url": null,1128          "flair_bg_color": null,1129          "flair_color": null,1130          "flair_group_id": null,1131          "badges_granted": [],1132          "version": 1,1133          "can_edit": false,1134          "can_delete": false,1135          "can_recover": false,1136          "can_see_hidden_post": false,1137          "can_wiki": false,1138          "read": true,1139          "user_title": "",1140          "bookmarked": false,1141          "actions_summary": [],1142          "moderator": false,1143          "admin": false,1144          "staff": false,1145          "user_id": 16631,1146          "hidden": false,1147          "trust_level": 1,1148          "deleted_at": null,1149          "user_deleted": false,1150          "edit_reason": null,1151          "can_view_edit_history": true,1152          "wiki": false,1153          "post_url": "/t/how-to-manage-ram-capacity-while-loading-dataloader-in-deep-learning/51437/1",1154          "can_accept_answer": false,1155          "can_unaccept_answer": false,1156          "accepted_answer": false,1157          "topic_accepted_answer": true,1158          "can_vote": false1159        },1160        {1161          "id": 125216,1162          "name": "",1163          "username": "ptrblck",1164          "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",1165          "created_at": "2019-07-24T18:00:15.532Z",1166          "cooked": "<p>The storage of 10 frames of shape <code>227x227</code> shouldn’t cause any problems itself.<br>\nAssuming that you are dealing with RGB images, you would only use approx. <code>10*227*227*3*4 / 1024**2 = 5.9MB</code>, if you store the images in FP32.</p>\n<p>Do you run out of memory directly after loading the data or could some other code part (e.g. model forward/backward) cause this issue?</p>",1167          "post_number": 2,1168          "post_type": 1,1169          "posts_count": 5,1170          "updated_at": "2019-07-24T18:00:15.532Z",1171          "reply_count": 1,1172          "reply_to_post_number": null,1173          "quote_count": 0,1174          "incoming_link_count": 9,1175          "reads": 32,1176          "readers_count": 31,1177          "score": 71.4,1178          "yours": false,1179          "topic_id": 51437,1180          "topic_slug": "how-to-manage-ram-capacity-while-loading-dataloader-in-deep-learning",1181          "display_username": "",1182          "primary_group_name": null,1183          "flair_name": null,1184          "flair_url": null,1185          "flair_bg_color": null,1186          "flair_color": null,1187          "flair_group_id": null,1188          "badges_granted": [],1189          "version": 1,1190          "can_edit": false,1191          "can_delete": false,1192          "can_recover": false,1193          "can_see_hidden_post": false,1194          "can_wiki": false,1195          "read": true,1196          "user_title": "",1197          "bookmarked": false,1198          "actions_summary": [1199            {1200              "id": 2,

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