Anurag1734/cuda-error-resolution-analysis
07
1[2 {3 "post_stream": {4 "posts": [5 {6 "id": 336786,7 "name": "Finn Anderson",8 "username": "nn_beginner",9 "avatar_template": "/letter_avatar_proxy/v4/letter/n/c4cdca/{size}.png",10 "created_at": "2022-03-18T12:09:20.990Z",11 "cooked": "<p>Hi,<br>\nI am designing a NN controller which is trained using a state space model (SSM) representation NN already built. The controller makes predictions for the next N outputs, where N = 2. The SSM using one of the inputs at a time to compute the next state, and so on for N inputs. After each output I change the input by one time step to accommodate for this.</p>\n<p>This is where the issue arises, making updates to the tensor means the autograd can no longer compute the gradient.</p>\n<p>Ideally, I would like a tensor of the N outputs caused by the N inputs, to compare to a desired tensor from where the loss can be computed, is there a way to do this?</p>\n<p>Below, I have my code:</p>\n<p>For context, X is the N previous input and state tensor</p>\n<code>\n<pre><code>for dd in range(0, len(x_train) - batch, batch):\n X = x_train[dd:dd + batch]\n optimizer.zero_grad()\n output = dpc(X)\n optimizer.zero_grad()\n\n history = torch.zeros((batch, 21))\n #fill this array with the current states\n for r in range(batch):\n for ii in range(20):\n history[r][ii] = X[r][ii]\n history[r][20] = output[r][0]\n y = ss_model(history[0:4][0:21])\n y = (y * (max_a[1][0] - min_a[1][0])) + min_a[1][0]\n desired = torch.zeros((batch, 1))\n loss = (F.mse_loss(y, desired))\n print(y)\n\n for gg in range(batch):\n for ll in range(19):\n history[gg][ll] = history[gg][ll+2]\n history[gg][19] = history[gg][20]\n history[gg][20] = y[gg][0]\n\n y2 = ss_model(history[0:4][0:21])\n y2 = (y2 * (max_a[1][0] - min_a[1][0])) + min_a[1][0]\n print(y2)\n loss2 = (F.mse_loss(y2, desired))\n loss2.backward()\n optimizer.step()\n</code></pre>\n</code>\n<p>Many thanks</p>",12 "post_number": 1,13 "post_type": 1,14 "posts_count": 2,15 "updated_at": "2022-03-18T22:42:32.255Z",16 "reply_count": 0,17 "reply_to_post_number": null,18 "quote_count": 0,19 "incoming_link_count": 21,20 "reads": 11,21 "readers_count": 10,22 "score": 107.2,23 "yours": false,24 "topic_id": 146811,25 "topic_slug": "computing-multiple-losses-error",26 "display_username": "Finn Anderson",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": 2,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": 53979,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/computing-multiple-losses-error/146811/1",56 "can_accept_answer": false,57 "can_unaccept_answer": false,58 "accepted_answer": false,59 "topic_accepted_answer": null,60 "can_vote": false61 },62 {63 "id": 337429,64 "name": "Alban D",65 "username": "albanD",66 "avatar_template": "/user_avatar/discuss.pytorch.org/alband/{size}/215_2.png",67 "created_at": "2022-03-22T15:59:18.770Z",68 "cooked": "<p>Hi,</p>\n<p>It would help if you could provide a code sample that we could run here. With dummy Modules/Optimizers if you don’t want to share the ones you use.</p>\n<p>Note that you can simplify your code as follows already:</p>\n<pre><code class=\"lang-auto\">for dd in range(0, len(x_train) - batch, batch):\n X = x_train[dd:dd + batch]\n optimizer.zero_grad()\n output = dpc(X)\n optimizer.zero_grad()\n\n history = torch.zeros((batch, 21))\n #fill this array with the current states\n history.narrow(1, 0, 20).copy_(X)\n history.narrow(1, -1, 1).copy_(output)\n\n y = ss_model(history[0:4])\n y = (y * (max_a[1][0] - min_a[1][0])) + min_a[1][0]\n desired = torch.zeros((batch, 1))\n loss = (F.mse_loss(y, desired))\n print(y)\n\n history.narrow(1, 0, 19).copy_(history.narrow(1, 2, 19))\n history.select(1, 19).copy_(history.select(1, 20))\n history.narrow(1, 20, 1).copy_(y)\n\n y2 = ss_model(history[0:4])\n y2 = (y2 * (max_a[1][0] - min_a[1][0])) + min_a[1][0]\n print(y2)\n loss2 = (F.mse_loss(y2, desired))\n loss2.backward()\n optimizer.step()\n</code></pre>\n<p>That should at least be faster. But if you want to keep around the history, you can just <code>.clone()</code> that Tensor whenever you need that value saved.</p>",69 "post_number": 2,70 "post_type": 1,71 "posts_count": 2,72 "updated_at": "2022-03-22T15:59:18.770Z",73 "reply_count": 0,74 "reply_to_post_number": null,75 "quote_count": 0,76 "incoming_link_count": 0,77 "reads": 5,78 "readers_count": 4,79 "score": 1.0,80 "yours": false,81 "topic_id": 146811,82 "topic_slug": "computing-multiple-losses-error",83 "display_username": "Alban D",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 "moderator": true,102 "admin": true,103 "staff": true,104 "user_id": 211,105 "hidden": false,106 "trust_level": 4,107 "deleted_at": null,108 "user_deleted": false,109 "edit_reason": null,110 "can_view_edit_history": true,111 "wiki": false,112 "post_url": "/t/computing-multiple-losses-error/146811/2",113 "can_accept_answer": false,114 "can_unaccept_answer": false,115 "accepted_answer": false,116 "topic_accepted_answer": null117 }118 ],119 "stream": [120 336786,121 337429122 ]123 },124 "timeline_lookup": [125 [126 1,127 1317128 ],129 [130 2,131 1313132 ]133 ],134 "suggested_topics": [135 {136 "fancy_title": "Making autograd saved tensors hooks specific to certain arguments",137 "id": 218433,138 "title": "Making autograd saved tensors hooks specific to certain arguments",139 "slug": "making-autograd-saved-tensors-hooks-specific-to-certain-arguments",140 "posts_count": 9,141 "reply_count": 6,142 "highest_post_number": 9,143 "image_url": null,144 "created_at": "2025-03-31T10:12:52.310Z",145 "last_posted_at": "2025-09-17T07:44:20.765Z",146 "bumped": true,147 "bumped_at": "2025-09-17T07:44:20.765Z",148 "archetype": "regular",149 "unseen": false,150 "pinned": false,151 "unpinned": null,152 "visible": true,153 "closed": false,154 "archived": false,155 "bookmarked": null,156 "liked": null,157 "tags_descriptions": {},158 "like_count": 0,159 "views": 192,160 "category_id": 7,161 "featured_link": null,162 "has_accepted_answer": true,163 "posters": [164 {165 "extras": "latest",166 "description": "Original Poster, Most Recent Poster, Accepted Answer",167 "user": {168 "id": 81725,169 "username": "mseeger",170 "name": null,171 "avatar_template": "/letter_avatar_proxy/v4/letter/m/6bbea6/{size}.png",172 "trust_level": 1173 }174 },175 {176 "extras": null,177 "description": "Frequent Poster",178 "user": {179 "id": 41396,180 "username": "soulitzer",181 "name": "",182 "avatar_template": "/letter_avatar_proxy/v4/letter/s/839c29/{size}.png",183 "trust_level": 2184 }185 }186 ]187 },188 {189 "fancy_title": "Calculating the Jacobian of gradients w.r.t to true output",190 "id": 214308,191 "title": "Calculating the Jacobian of gradients w.r.t to true output",192 "slug": "calculating-the-jacobian-of-gradients-w-r-t-to-true-output",193 "posts_count": 2,194 "reply_count": 0,195 "highest_post_number": 2,196 "image_url": "https://discuss.pytorch.org/uploads/default/original/3X/0/5/0517e389e03f091e9b23ac145313b45edb26a3c8.png",197 "created_at": "2024-12-17T12:33:54.000Z",198 "last_posted_at": "2024-12-25T19:19:59.743Z",199 "bumped": true,200 "bumped_at": "2024-12-25T19:19:59.743Z",201 "archetype": "regular",202 "unseen": false,203 "pinned": false,204 "unpinned": null,205 "visible": true,206 "closed": false,207 "archived": false,208 "bookmarked": null,209 "liked": null,210 "tags_descriptions": {},211 "like_count": 0,212 "views": 48,213 "category_id": 7,214 "featured_link": null,215 "has_accepted_answer": false,216 "posters": [217 {218 "extras": null,219 "description": "Original Poster",220 "user": {221 "id": 81544,222 "username": "zisissour",223 "name": "Zisis Sourlas",224 "avatar_template": "/user_avatar/discuss.pytorch.org/zisissour/{size}/74550_2.png",225 "trust_level": 1226 }227 },228 {229 "extras": "latest",230 "description": "Most Recent Poster",231 "user": {232 "id": 75871,233 "username": "qq-me",234 "name": "Ivan Nikishev",235 "avatar_template": "/user_avatar/discuss.pytorch.org/qq-me/{size}/70055_2.png",236 "trust_level": 2237 }238 }239 ]240 },241 {242 "fancy_title": "Splitting a model with detach",243 "id": 212378,244 "title": "Splitting a model with detach",245 "slug": "splitting-a-model-with-detach",246 "posts_count": 3,247 "reply_count": 0,248 "highest_post_number": 3,249 "image_url": null,250 "created_at": "2024-10-31T18:16:47.014Z",251 "last_posted_at": "2024-12-15T17:29:13.112Z",252 "bumped": true,253 "bumped_at": "2024-12-15T17:29:13.112Z",254 "archetype": "regular",255 "unseen": false,256 "pinned": false,257 "unpinned": null,258 "visible": true,259 "closed": false,260 "archived": false,261 "bookmarked": null,262 "liked": null,263 "tags_descriptions": {},264 "like_count": 0,265 "views": 55,266 "category_id": 7,267 "featured_link": null,268 "has_accepted_answer": true,269 "posters": [270 {271 "extras": null,272 "description": "Original Poster",273 "user": {274 "id": 80622,275 "username": "Fred_Shone",276 "name": "Fred Shone",277 "avatar_template": "/user_avatar/discuss.pytorch.org/fred_shone/{size}/73707_2.png",278 "trust_level": 1279 }280 },281 {282 "extras": "latest",283 "description": "Most Recent Poster, Accepted Answer",284 "user": {285 "id": 41396,286 "username": "soulitzer",287 "name": "",288 "avatar_template": "/letter_avatar_proxy/v4/letter/s/839c29/{size}.png",289 "trust_level": 2290 }291 }292 ]293 },294 {295 "fancy_title": ".grad should not equal None here",296 "id": 215725,297 "title": ".grad should not equal None here",298 "slug": "grad-should-not-equal-none-here",299 "posts_count": 4,300 "reply_count": 2,301 "highest_post_number": 4,302 "image_url": null,303 "created_at": "2025-01-22T16:51:06.619Z",304 "last_posted_at": "2025-01-23T13:39:23.959Z",305 "bumped": true,306 "bumped_at": "2025-01-23T13:39:23.959Z",307 "archetype": "regular",308 "unseen": false,309 "pinned": false,310 "unpinned": null,311 "visible": true,312 "closed": false,313 "archived": false,314 "bookmarked": null,315 "liked": null,316 "tags_descriptions": {},317 "like_count": 0,318 "views": 200,319 "category_id": 7,320 "featured_link": null,321 "has_accepted_answer": false,322 "posters": [323 {324 "extras": null,325 "description": "Original Poster",326 "user": {327 "id": 82235,328 "username": "wei_yong",329 "name": "wei yong",330 "avatar_template": "/user_avatar/discuss.pytorch.org/wei_yong/{size}/75234_2.png",331 "trust_level": 1332 }333 },334 {335 "extras": "latest",336 "description": "Most Recent Poster",337 "user": {338 "id": 3534,339 "username": "ptrblck",340 "name": "",341 "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",342 "admin": true,343 "moderator": true,344 "trust_level": 2345 }346 }347 ]348 },349 {350 "fancy_title": "Most efficient way to re-use grad computations in a layer which is a linear combination of linear layers",351 "id": 219274,352 "title": "Most efficient way to re-use grad computations in a layer which is a linear combination of linear layers",353 "slug": "most-efficient-way-to-re-use-grad-computations-in-a-layer-which-is-a-linear-combination-of-linear-layers",354 "posts_count": 3,355 "reply_count": 0,356 "highest_post_number": 3,357 "image_url": null,358 "created_at": "2025-04-20T17:22:38.368Z",359 "last_posted_at": "2025-04-20T17:48:15.387Z",360 "bumped": true,361 "bumped_at": "2025-04-20T18:24:07.162Z",362 "archetype": "regular",363 "unseen": false,364 "pinned": false,365 "unpinned": null,366 "visible": true,367 "closed": false,368 "archived": false,369 "bookmarked": null,370 "liked": null,371 "tags_descriptions": {},372 "like_count": 0,373 "views": 53,374 "category_id": 7,375 "featured_link": null,376 "has_accepted_answer": false,377 "posters": [378 {379 "extras": "latest",380 "description": "Original Poster, Most Recent Poster",381 "user": {382 "id": 83919,383 "username": "nikitaved",384 "name": "Nikitaved",385 "avatar_template": "/user_avatar/discuss.pytorch.org/nikitaved/{size}/76721_2.png",386 "trust_level": 1387 }388 },389 {390 "extras": null,391 "description": "Frequent Poster",392 "user": {393 "id": 3534,394 "username": "ptrblck",395 "name": "",396 "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",397 "admin": true,398 "moderator": true,399 "trust_level": 2400 }401 }402 ]403 }404 ],405 "tags_descriptions": {},406 "fancy_title": "Computing multiple losses error",407 "id": 146811,408 "title": "Computing multiple losses error",409 "posts_count": 2,410 "created_at": "2022-03-18T12:09:20.926Z",411 "views": 482,412 "reply_count": 0,413 "like_count": 0,414 "last_posted_at": "2022-03-22T15:59:18.770Z",415 "visible": true,416 "closed": false,417 "archived": false,418 "has_summary": false,419 "archetype": "regular",420 "slug": "computing-multiple-losses-error",421 "category_id": 7,422 "word_count": 483,423 "deleted_at": null,424 "user_id": 53979,425 "featured_link": null,426 "pinned_globally": false,427 "pinned_at": null,428 "pinned_until": null,429 "image_url": null,430 "slow_mode_seconds": 0,431 "draft": null,432 "draft_key": "topic_146811",433 "draft_sequence": null,434 "unpinned": null,435 "pinned": false,436 "current_post_number": 1,437 "highest_post_number": 2,438 "deleted_by": null,439 "actions_summary": [440 {441 "id": 4,442 "count": 0,443 "hidden": false,444 "can_act": false445 },446 {447 "id": 8,448 "count": 0,449 "hidden": false,450 "can_act": false451 },452 {453 "id": 10,454 "count": 0,455 "hidden": false,456 "can_act": false457 },458 {459 "id": 7,460 "count": 0,461 "hidden": false,462 "can_act": false463 }464 ],465 "chunk_size": 20,466 "bookmarked": false,467 "topic_timer": null,468 "message_bus_last_id": 0,469 "participant_count": 2,470 "show_read_indicator": false,471 "thumbnails": null,472 "slow_mode_enabled_until": null,473 "can_vote": false,474 "vote_count": 0,475 "user_voted": false,476 "discourse_zendesk_plugin_zendesk_id": null,477 "discourse_zendesk_plugin_zendesk_url": "https://your-url.zendesk.com/agent/tickets/",478 "details": {479 "can_edit": false,480 "notification_level": 1,481 "participants": [482 {483 "id": 211,484 "username": "albanD",485 "name": "Alban D",486 "avatar_template": "/user_avatar/discuss.pytorch.org/alband/{size}/215_2.png",487 "post_count": 1,488 "primary_group_name": null,489 "flair_name": null,490 "flair_url": null,491 "flair_color": null,492 "flair_bg_color": null,493 "flair_group_id": null,494 "admin": true,495 "moderator": true,496 "trust_level": 4497 },498 {499 "id": 53979,500 "username": "nn_beginner",501 "name": "Finn Anderson",502 "avatar_template": "/letter_avatar_proxy/v4/letter/n/c4cdca/{size}.png",503 "post_count": 1,504 "primary_group_name": null,505 "flair_name": null,506 "flair_url": null,507 "flair_color": null,508 "flair_bg_color": null,509 "flair_group_id": null,510 "trust_level": 1511 }512 ],513 "created_by": {514 "id": 53979,515 "username": "nn_beginner",516 "name": "Finn Anderson",517 "avatar_template": "/letter_avatar_proxy/v4/letter/n/c4cdca/{size}.png"518 },519 "last_poster": {520 "id": 211,521 "username": "albanD",522 "name": "Alban D",523 "avatar_template": "/user_avatar/discuss.pytorch.org/alband/{size}/215_2.png"524 }525 },526 "bookmarks": []527 },528 {529 "post_stream": {530 "posts": [531 {532 "id": 337428,533 "name": "Silviu",534 "username": "smu226",535 "avatar_template": "/user_avatar/discuss.pytorch.org/smu226/{size}/9063_2.png",536 "created_at": "2022-03-22T15:54:45.964Z",537 "cooked": "<p>Hello! Is there an official Pytorch implementation of Bayesian NN? Or at least a non Pytorch implementation that is commonly used by the Pytorch community? I found some on github, but I am not sure which one I should use.</p>",538 "post_number": 1,539 "post_type": 1,540 "posts_count": 1,541 "updated_at": "2022-03-22T15:54:45.964Z",542 "reply_count": 0,543 "reply_to_post_number": null,544 "quote_count": 0,545 "incoming_link_count": 56,546 "reads": 8,547 "readers_count": 7,548 "score": 281.6,549 "yours": false,550 "topic_id": 147162,551 "topic_slug": "bayesian-neural-networks",552 "display_username": "Silviu",553 "primary_group_name": null,554 "flair_name": null,555 "flair_url": null,556 "flair_bg_color": null,557 "flair_color": null,558 "flair_group_id": null,559 "badges_granted": [],560 "version": 1,561 "can_edit": false,562 "can_delete": false,563 "can_recover": false,564 "can_see_hidden_post": false,565 "can_wiki": false,566 "read": true,567 "user_title": null,568 "bookmarked": false,569 "actions_summary": [],570 "moderator": false,571 "admin": false,572 "staff": false,573 "user_id": 15365,574 "hidden": false,575 "trust_level": 1,576 "deleted_at": null,577 "user_deleted": false,578 "edit_reason": null,579 "can_view_edit_history": true,580 "wiki": false,581 "post_url": "/t/bayesian-neural-networks/147162/1",582 "can_accept_answer": false,583 "can_unaccept_answer": false,584 "accepted_answer": false,585 "topic_accepted_answer": null,586 "can_vote": false587 }588 ],589 "stream": [590 337428591 ]592 },593 "timeline_lookup": [594 [595 1,596 1313597 ]598 ],599 "suggested_topics": [600 {601 "fancy_title": "Best way to find a specific tensor within a model",602 "id": 214277,603 "title": "Best way to find a specific tensor within a model",604 "slug": "best-way-to-find-a-specific-tensor-within-a-model",605 "posts_count": 5,606 "reply_count": 2,607 "highest_post_number": 5,608 "image_url": null,609 "created_at": "2024-12-16T15:35:30.104Z",610 "last_posted_at": "2024-12-16T16:49:25.910Z",611 "bumped": true,612 "bumped_at": "2024-12-16T16:49:25.910Z",613 "archetype": "regular",614 "unseen": false,615 "pinned": false,616 "unpinned": null,617 "visible": true,618 "closed": false,619 "archived": false,620 "bookmarked": null,621 "liked": null,622 "tags_descriptions": {},623 "like_count": 2,624 "views": 59,625 "category_id": 1,626 "featured_link": null,627 "has_accepted_answer": true,628 "posters": [629 {630 "extras": "latest",631 "description": "Original Poster, Most Recent Poster, Accepted Answer",632 "user": {633 "id": 6296,634 "username": "pytorcher",635 "name": "",636 "avatar_template": "/letter_avatar_proxy/v4/letter/p/7ea924/{size}.png",637 "trust_level": 1638 }639 },640 {641 "extras": null,642 "description": "Frequent Poster",643 "user": {644 "id": 211,645 "username": "albanD",646 "name": "Alban D",647 "avatar_template": "/user_avatar/discuss.pytorch.org/alband/{size}/215_2.png",648 "admin": true,649 "moderator": true,650 "trust_level": 4651 }652 }653 ]654 },655 {656 "fancy_title": "JetPack 5.0 on Jetson NanoB01?",657 "id": 215963,658 "title": "JetPack 5.0 on Jetson NanoB01?",659 "slug": "jetpack-5-0-on-jetson-nanob01",660 "posts_count": 3,661 "reply_count": 2,662 "highest_post_number": 4,663 "image_url": null,664 "created_at": "2025-01-27T20:44:03.486Z",665 "last_posted_at": "2025-01-28T13:27:13.464Z",666 "bumped": true,667 "bumped_at": "2025-01-28T13:27:13.464Z",668 "archetype": "regular",669 "unseen": false,670 "pinned": false,671 "unpinned": null,672 "visible": true,673 "closed": false,674 "archived": false,675 "bookmarked": null,676 "liked": null,677 "tags_descriptions": {},678 "like_count": 0,679 "views": 143,680 "category_id": 1,681 "featured_link": null,682 "has_accepted_answer": false,683 "posters": [684 {685 "extras": null,686 "description": "Original Poster",687 "user": {688 "id": 82311,689 "username": "Bekzod",690 "name": "",691 "avatar_template": "/user_avatar/discuss.pytorch.org/bekzod/{size}/75336_2.png",692 "trust_level": 0693 }694 },695 {696 "extras": "latest",697 "description": "Most Recent Poster",698 "user": {699 "id": 3534,700 "username": "ptrblck",701 "name": "",702 "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",703 "admin": true,704 "moderator": true,705 "trust_level": 2706 }707 }708 ]709 },710 {711 "fancy_title": "How to Perform Multiple Inferences on Multiple GPUs in PyTorch?",712 "id": 216826,713 "title": "How to Perform Multiple Inferences on Multiple GPUs in PyTorch?",714 "slug": "how-to-perform-multiple-inferences-on-multiple-gpus-in-pytorch",715 "posts_count": 3,716 "reply_count": 1,717 "highest_post_number": 3,718 "image_url": null,719 "created_at": "2025-02-18T13:31:19.033Z",720 "last_posted_at": "2025-02-19T10:55:51.344Z",721 "bumped": true,722 "bumped_at": "2025-02-19T10:55:51.344Z",723 "archetype": "regular",724 "unseen": false,725 "pinned": false,726 "unpinned": null,727 "visible": true,728 "closed": false,729 "archived": false,730 "bookmarked": null,731 "liked": null,732 "tags_descriptions": {},733 "like_count": 0,734 "views": 128,735 "category_id": 1,736 "featured_link": null,737 "has_accepted_answer": false,738 "posters": [739 {740 "extras": "latest",741 "description": "Original Poster, Most Recent Poster",742 "user": {743 "id": 82761,744 "username": "dmp58",745 "name": "",746 "avatar_template": "/user_avatar/discuss.pytorch.org/dmp58/{size}/75721_2.png",747 "trust_level": 0748 }749 },750 {751 "extras": null,752 "description": "Frequent Poster",753 "user": {754 "id": 3534,755 "username": "ptrblck",756 "name": "",757 "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",758 "admin": true,759 "moderator": true,760 "trust_level": 2761 }762 }763 ]764 },765 {766 "fancy_title": "Call order of hooks",767 "id": 215863,768 "title": "Call order of hooks",769 "slug": "call-order-of-hooks",770 "posts_count": 1,771 "reply_count": 0,772 "highest_post_number": 1,773 "image_url": null,774 "created_at": "2025-01-25T16:57:33.402Z",775 "last_posted_at": "2025-01-25T16:57:33.447Z",776 "bumped": true,777 "bumped_at": "2025-01-25T16:57:33.447Z",778 "archetype": "regular",779 "unseen": false,780 "pinned": false,781 "unpinned": null,782 "visible": true,783 "closed": false,784 "archived": false,785 "bookmarked": null,786 "liked": null,787 "tags_descriptions": {},788 "like_count": 0,789 "views": 70,790 "category_id": 1,791 "featured_link": null,792 "has_accepted_answer": false,793 "posters": [794 {795 "extras": "latest single",796 "description": "Original Poster, Most Recent Poster",797 "user": {798 "id": 82245,799 "username": "sternj",800 "name": null,801 "avatar_template": "/letter_avatar_proxy/v4/letter/s/b19c9b/{size}.png",802 "trust_level": 1803 }804 }805 ]806 },807 {808 "fancy_title": "Pytoch geometric dimension mismatch input and edge indices",809 "id": 221402,810 "title": "Pytoch geometric dimension mismatch input and edge indices",811 "slug": "pytoch-geometric-dimension-mismatch-input-and-edge-indices",812 "posts_count": 5,813 "reply_count": 0,814 "highest_post_number": 7,815 "image_url": null,816 "created_at": "2025-07-09T22:13:56.187Z",817 "last_posted_at": "2025-07-12T17:01:03.413Z",818 "bumped": true,819 "bumped_at": "2025-07-12T17:01:03.413Z",820 "archetype": "regular",821 "unseen": false,822 "pinned": false,823 "unpinned": null,824 "visible": true,825 "closed": false,826 "archived": false,827 "bookmarked": null,828 "liked": null,829 "tags_descriptions": {},830 "like_count": 1,831 "views": 88,832 "category_id": 1,833 "featured_link": null,834 "has_accepted_answer": false,835 "posters": [836 {837 "extras": null,838 "description": "Original Poster",839 "user": {840 "id": 60921,841 "username": "Salman_Abbasi",842 "name": "Salman Abbasi",843 "avatar_template": "/user_avatar/discuss.pytorch.org/salman_abbasi/{size}/46234_2.png",844 "trust_level": 2845 }846 },847 {848 "extras": "latest",849 "description": "Most Recent Poster",850 "user": {851 "id": 84484,852 "username": "Dhia-naouali",853 "name": "Dhia naouali",854 "avatar_template": "/user_avatar/discuss.pytorch.org/dhia-naouali/{size}/77193_2.png",855 "trust_level": 2856 }857 }858 ]859 }860 ],861 "tags_descriptions": {},862 "fancy_title": "Bayesian Neural Networks",863 "id": 147162,864 "title": "Bayesian Neural Networks",865 "posts_count": 1,866 "created_at": "2022-03-22T15:54:45.901Z",867 "views": 412,868 "reply_count": 0,869 "like_count": 0,870 "last_posted_at": "2022-03-22T15:54:45.964Z",871 "visible": true,872 "closed": false,873 "archived": false,874 "has_summary": false,875 "archetype": "regular",876 "slug": "bayesian-neural-networks",877 "category_id": 1,878 "word_count": 40,879 "deleted_at": null,880 "user_id": 15365,881 "featured_link": null,882 "pinned_globally": false,883 "pinned_at": null,884 "pinned_until": null,885 "image_url": null,886 "slow_mode_seconds": 0,887 "draft": null,888 "draft_key": "topic_147162",889 "draft_sequence": null,890 "unpinned": null,891 "pinned": false,892 "current_post_number": 1,893 "highest_post_number": 1,894 "deleted_by": null,895 "actions_summary": [896 {897 "id": 4,898 "count": 0,899 "hidden": false,900 "can_act": false901 },902 {903 "id": 8,904 "count": 0,905 "hidden": false,906 "can_act": false907 },908 {909 "id": 10,910 "count": 0,911 "hidden": false,912 "can_act": false913 },914 {915 "id": 7,916 "count": 0,917 "hidden": false,918 "can_act": false919 }920 ],921 "chunk_size": 20,922 "bookmarked": false,923 "topic_timer": null,924 "message_bus_last_id": 0,925 "participant_count": 1,926 "show_read_indicator": false,927 "thumbnails": null,928 "slow_mode_enabled_until": null,929 "can_vote": false,930 "vote_count": 0,931 "user_voted": false,932 "discourse_zendesk_plugin_zendesk_id": null,933 "discourse_zendesk_plugin_zendesk_url": "https://your-url.zendesk.com/agent/tickets/",934 "details": {935 "can_edit": false,936 "notification_level": 1,937 "participants": [938 {939 "id": 15365,940 "username": "smu226",941 "name": "Silviu",942 "avatar_template": "/user_avatar/discuss.pytorch.org/smu226/{size}/9063_2.png",943 "post_count": 1,944 "primary_group_name": null,945 "flair_name": null,946 "flair_url": null,947 "flair_color": null,948 "flair_bg_color": null,949 "flair_group_id": null,950 "trust_level": 1951 }952 ],953 "created_by": {954 "id": 15365,955 "username": "smu226",956 "name": "Silviu",957 "avatar_template": "/user_avatar/discuss.pytorch.org/smu226/{size}/9063_2.png"958 },959 "last_poster": {960 "id": 15365,961 "username": "smu226",962 "name": "Silviu",963 "avatar_template": "/user_avatar/discuss.pytorch.org/smu226/{size}/9063_2.png"964 }965 },966 "bookmarks": []967 },968 {969 "post_stream": {970 "posts": [971 {972 "id": 336793,973 "name": "",974 "username": "AleTL",975 "avatar_template": "/user_avatar/discuss.pytorch.org/aletl/{size}/30506_2.png",976 "created_at": "2022-03-18T12:54:59.803Z",977 "cooked": "<p>Hello!</p>\n<p>I have tabular data and what I want is to take these data, transform them into several graphs, and input these graphs to some GNN. Pytorch Geometric allow to generate my own dataset both in memory and storing it. But what I want is to generate the graphs on the fly. I don’t want to process the whole tabular data, generate the graphs and then feed the GNN; what I want is to generate the graphs on the fly and directly feed them to the GNN. Everytime I need a new batch of graphs, I take the tabular data, generate the graphs, feed them and then remove them and start again with new data.</p>\n<p>Does anyone know if this is possible or how should I do it? I’ve been trying to look for information or code snips but I’ve found nothing.</p>\n<p>Thank you!</p>",978 "post_number": 1,979 "post_type": 1,980 "posts_count": 2,981 "updated_at": "2022-03-18T12:54:59.803Z",982 "reply_count": 0,983 "reply_to_post_number": null,984 "quote_count": 0,985 "incoming_link_count": 318,986 "reads": 13,987 "readers_count": 12,988 "score": 1592.6,989 "yours": false,990 "topic_id": 146814,991 "topic_slug": "pyg-batch-generation-on-the-fly",992 "display_username": "",993 "primary_group_name": null,994 "flair_name": null,995 "flair_url": null,996 "flair_bg_color": null,997 "flair_color": null,998 "flair_group_id": null,999 "badges_granted": [],1000 "version": 1,1001 "can_edit": false,1002 "can_delete": false,1003 "can_recover": false,1004 "can_see_hidden_post": false,1005 "can_wiki": false,1006 "read": true,1007 "user_title": "",1008 "bookmarked": false,1009 "actions_summary": [],1010 "moderator": false,1011 "admin": false,1012 "staff": false,1013 "user_id": 39763,1014 "hidden": false,1015 "trust_level": 1,1016 "deleted_at": null,1017 "user_deleted": false,1018 "edit_reason": null,1019 "can_view_edit_history": true,1020 "wiki": false,1021 "post_url": "/t/pyg-batch-generation-on-the-fly/146814/1",1022 "can_accept_answer": false,1023 "can_unaccept_answer": false,1024 "accepted_answer": false,1025 "topic_accepted_answer": true,1026 "can_vote": false1027 },1028 {1029 "id": 337427,1030 "name": "Erjia",1031 "username": "ejguan",1032 "avatar_template": "/letter_avatar_proxy/v4/letter/e/5f8ce5/{size}.png",1033 "created_at": "2022-03-22T15:40:36.877Z",1034 "cooked": "<p>If you choose to use <code>Dataset</code> in PyTorch, you can implement all data retrieving logic inside <code>__getitem__</code> function to do data generation on the fly.</p>\n<p>Or, you can choose to use torchdata <a href=\"https://github.com/pytorch/data\" class=\"inline-onebox\" rel=\"noopener nofollow ugc\">GitHub - pytorch/data: A PyTorch repo for data loading and utilities to be shared by the PyTorch domain libraries.</a>, which utilize iterator-style datapipe to help you construct data pipeline on the fly.</p>",1035 "post_number": 2,1036 "post_type": 1,1037 "posts_count": 2,1038 "updated_at": "2022-03-22T15:40:36.877Z",1039 "reply_count": 0,1040 "reply_to_post_number": null,1041 "quote_count": 0,1042 "incoming_link_count": 7,1043 "reads": 12,1044 "readers_count": 11,1045 "score": 37.4,1046 "yours": false,1047 "topic_id": 146814,1048 "topic_slug": "pyg-batch-generation-on-the-fly",1049 "display_username": "Erjia",1050 "primary_group_name": null,1051 "flair_name": null,1052 "flair_url": null,1053 "flair_bg_color": null,1054 "flair_color": null,1055 "flair_group_id": null,1056 "badges_granted": [],1057 "version": 1,1058 "can_edit": false,1059 "can_delete": false,1060 "can_recover": false,1061 "can_see_hidden_post": false,1062 "can_wiki": false,1063 "link_counts": [1064 {1065 "url": "https://github.com/pytorch/data",1066 "internal": false,1067 "reflection": false,1068 "title": "GitHub - pytorch/data: A PyTorch repo for data loading and utilities to be shared by the PyTorch domain libraries.",1069 "clicks": 221070 }1071 ],1072 "read": true,1073 "user_title": null,1074 "bookmarked": false,1075 "actions_summary": [],1076 "moderator": false,1077 "admin": false,1078 "staff": false,1079 "user_id": 37796,1080 "hidden": false,1081 "trust_level": 2,1082 "deleted_at": null,1083 "user_deleted": false,1084 "edit_reason": null,1085 "can_view_edit_history": true,1086 "wiki": false,1087 "post_url": "/t/pyg-batch-generation-on-the-fly/146814/2",1088 "can_accept_answer": false,1089 "can_unaccept_answer": false,1090 "accepted_answer": true,1091 "topic_accepted_answer": true1092 }1093 ],1094 "stream": [1095 336793,1096 3374271097 ]1098 },1099 "timeline_lookup": [1100 [1101 1,1102 13171103 ],1104 [1105 2,1106 13131107 ]1108 ],1109 "suggested_topics": [1110 {1111 "fancy_title": "Sizes of tensors must match except in dimension 0. Expected size 914 but got size 531 for tensor number 1 in the list",1112 "id": 216813,1113 "title": "Sizes of tensors must match except in dimension 0. Expected size 914 but got size 531 for tensor number 1 in the list",1114 "slug": "sizes-of-tensors-must-match-except-in-dimension-0-expected-size-914-but-got-size-531-for-tensor-number-1-in-the-list",1115 "posts_count": 3,1116 "reply_count": 1,1117 "highest_post_number": 3,1118 "image_url": null,1119 "created_at": "2025-02-18T08:08:49.761Z",1120 "last_posted_at": "2025-02-20T15:43:24.065Z",1121 "bumped": true,1122 "bumped_at": "2025-02-20T15:43:24.065Z",1123 "archetype": "regular",1124 "unseen": false,1125 "pinned": false,1126 "unpinned": null,1127 "visible": true,1128 "closed": false,1129 "archived": false,1130 "bookmarked": null,1131 "liked": null,1132 "tags_descriptions": {},1133 "like_count": 0,1134 "views": 129,1135 "category_id": 37,1136 "featured_link": null,1137 "has_accepted_answer": false,1138 "posters": [1139 {1140 "extras": "latest",1141 "description": "Original Poster, Most Recent Poster",1142 "user": {1143 "id": 82744,1144 "username": "Maria_Djeblahi",1145 "name": "Maria Djeblahi",1146 "avatar_template": "/user_avatar/discuss.pytorch.org/maria_djeblahi/{size}/75704_2.png",1147 "trust_level": 11148 }1149 },1150 {1151 "extras": null,1152 "description": "Frequent Poster",1153 "user": {1154 "id": 3534,1155 "username": "ptrblck",1156 "name": "",1157 "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",1158 "admin": true,1159 "moderator": true,1160 "trust_level": 21161 }1162 }1163 ]1164 },1165 {1166 "fancy_title": "Onnx Hanging Nodes Shown In Neutron Visualizer after Python Export?",1167 "id": 217779,1168 "title": "Onnx Hanging Nodes Shown In Neutron Visualizer after Python Export?",1169 "slug": "onnx-hanging-nodes-shown-in-neutron-visualizer-after-python-export",1170 "posts_count": 1,1171 "reply_count": 0,1172 "highest_post_number": 1,1173 "image_url": "https://discuss.pytorch.org/uploads/default/optimized/3X/7/d/7dbd06de79aef0c8be1a067f15290e954cbce8b0_2_354x1024.png",1174 "created_at": "2025-03-13T07:51:36.412Z",1175 "last_posted_at": "2025-03-13T07:51:36.450Z",1176 "bumped": true,1177 "bumped_at": "2025-03-13T07:51:36.450Z",1178 "archetype": "regular",1179 "unseen": false,1180 "pinned": false,1181 "unpinned": null,1182 "visible": true,1183 "closed": false,1184 "archived": false,1185 "bookmarked": null,1186 "liked": null,1187 "tags_descriptions": {},1188 "like_count": 0,1189 "views": 69,1190 "category_id": 37,1191 "featured_link": null,1192 "has_accepted_answer": false,1193 "posters": [1194 {1195 "extras": "latest single",1196 "description": "Original Poster, Most Recent Poster",1197 "user": {1198 "id": 83234,1199 "username": "catch22",1200 "name": "",