CoolFace
Datasetpublic

Anurag1734/cuda-error-resolution-analysis

sourceHugging Faceupdated 2mo agoView on Hugging Face
0likes7downloads
topics_batch_314.json64476 linesDownload Raw Back to raw
1[2  {3    "post_stream": {4      "posts": [5        {6          "id": 301864,7          "name": "Alison",8          "username": "alee023",9          "avatar_template": "/user_avatar/discuss.pytorch.org/alee023/{size}/30084_2.png",10          "created_at": "2021-08-18T23:47:23.989Z",11          "cooked": "<p>I am attempting to write a variational autoencoder, using PyTorch, that takes in 3D images of varying dimensions. My code right now works for even input dimensions which will face no issues when going through the pooling layer. For odd dimensions, however, the pooling layer will round down (for example, 15-&gt;7). Consequentially, one of my decoder layers that doubles the dimensions will give the incorrect output dimension (7-&gt;14, rather than 15).</p>\n<p>One of the workarounds I’ve come across is resizing the inputs to a compatible, even dimension before putting them through the network. Are there any other fixes to this issue – such as by using padding, etc)? I really appreciate any help.</p>",12          "post_number": 1,13          "post_type": 1,14          "posts_count": 2,15          "updated_at": "2021-08-18T23:47:23.989Z",16          "reply_count": 0,17          "reply_to_post_number": null,18          "quote_count": 0,19          "incoming_link_count": 172,20          "reads": 5,21          "readers_count": 4,22          "score": 861.0,23          "yours": false,24          "topic_id": 129707,25          "topic_slug": "getting-correct-output-dimensions-from-an-autoencoder-taking-variable-input-dimensions",26          "display_username": "Alison",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": "",42          "bookmarked": false,43          "actions_summary": [],44          "moderator": false,45          "admin": false,46          "staff": false,47          "user_id": 47218,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/getting-correct-output-dimensions-from-an-autoencoder-taking-variable-input-dimensions/129707/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": 301898,64          "name": "",65          "username": "ptrblck",66          "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",67          "created_at": "2021-08-19T05:35:19.186Z",68          "cooked": "<p>Padding the inputs with shape checks would certainly be another valid approach.<br>\nIn case you are using transposed conv layers for the upsampling, you could also use the <code>output_size</code> argument (in its <code>forward</code> call) to specify the desired output shape in case it’s ambiguous.</p>",69          "post_number": 2,70          "post_type": 1,71          "posts_count": 2,72          "updated_at": "2021-08-19T05:35:19.186Z",73          "reply_count": 0,74          "reply_to_post_number": null,75          "quote_count": 0,76          "incoming_link_count": 3,77          "reads": 5,78          "readers_count": 4,79          "score": 31.0,80          "yours": false,81          "topic_id": 129707,82          "topic_slug": "getting-correct-output-dimensions-from-an-autoencoder-taking-variable-input-dimensions",83          "display_username": "",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": true,107          "admin": true,108          "staff": true,109          "user_id": 3534,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/getting-correct-output-dimensions-from-an-autoencoder-taking-variable-input-dimensions/129707/2",118          "can_accept_answer": false,119          "can_unaccept_answer": false,120          "accepted_answer": false,121          "topic_accepted_answer": null122        }123      ],124      "stream": [125        301864,126        301898127      ]128    },129    "timeline_lookup": [130      [131        1,132        1529133      ]134    ],135    "suggested_topics": [136      {137        "fancy_title": "Questions about linter for PyTorch",138        "id": 217769,139        "title": "Questions about linter for PyTorch",140        "slug": "questions-about-linter-for-pytorch",141        "posts_count": 4,142        "reply_count": 2,143        "highest_post_number": 4,144        "image_url": null,145        "created_at": "2025-03-13T01:37:04.296Z",146        "last_posted_at": "2025-03-28T12:59:01.624Z",147        "bumped": true,148        "bumped_at": "2025-03-28T12:59:01.624Z",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": 1,160        "views": 143,161        "category_id": 1,162        "featured_link": null,163        "has_accepted_answer": false,164        "posters": [165          {166            "extras": null,167            "description": "Original Poster",168            "user": {169              "id": 72718,170              "username": "shaoyu_young",171              "name": "shaoyu young",172              "avatar_template": "/user_avatar/discuss.pytorch.org/shaoyu_young/{size}/63697_2.png",173              "trust_level": 1174            }175          },176          {177            "extras": null,178            "description": "Frequent Poster",179            "user": {180              "id": 68149,181              "username": "Soumya_Kundu",182              "name": "Soumya Snigdha Kundu",183              "avatar_template": "/user_avatar/discuss.pytorch.org/soumya_kundu/{size}/71716_2.png",184              "trust_level": 2185            }186          },187          {188            "extras": "latest",189            "description": "Most Recent Poster",190            "user": {191              "id": 3534,192              "username": "ptrblck",193              "name": "",194              "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",195              "admin": true,196              "moderator": true,197              "trust_level": 2198            }199          }200        ]201      },202      {203        "fancy_title": "Partial cuda graphs are slowere than original model?",204        "id": 213890,205        "title": "Partial cuda graphs are slowere than original model?",206        "slug": "partial-cuda-graphs-are-slowere-than-original-model",207        "posts_count": 6,208        "reply_count": 4,209        "highest_post_number": 6,210        "image_url": null,211        "created_at": "2024-12-06T03:02:07.536Z",212        "last_posted_at": "2024-12-12T06:42:55.380Z",213        "bumped": true,214        "bumped_at": "2024-12-12T06:42:55.380Z",215        "archetype": "regular",216        "unseen": false,217        "pinned": false,218        "unpinned": null,219        "visible": true,220        "closed": false,221        "archived": false,222        "bookmarked": null,223        "liked": null,224        "tags_descriptions": {},225        "like_count": 0,226        "views": 243,227        "category_id": 1,228        "featured_link": null,229        "has_accepted_answer": false,230        "posters": [231          {232            "extras": "latest",233            "description": "Original Poster, Most Recent Poster",234            "user": {235              "id": 81347,236              "username": "eliird",237              "name": "Ird",238              "avatar_template": "/user_avatar/discuss.pytorch.org/eliird/{size}/74389_2.png",239              "trust_level": 1240            }241          },242          {243            "extras": null,244            "description": "Frequent Poster",245            "user": {246              "id": 3534,247              "username": "ptrblck",248              "name": "",249              "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",250              "admin": true,251              "moderator": true,252              "trust_level": 2253            }254          }255        ]256      },257      {258        "fancy_title": "Asynchronous execution multiple GPUs",259        "id": 212448,260        "title": "Asynchronous execution multiple GPUs",261        "slug": "asynchronous-execution-multiple-gpus",262        "posts_count": 3,263        "reply_count": 1,264        "highest_post_number": 3,265        "image_url": null,266        "created_at": "2024-11-02T12:59:53.714Z",267        "last_posted_at": "2024-11-05T13:22:01.243Z",268        "bumped": true,269        "bumped_at": "2024-11-05T13:22:01.243Z",270        "archetype": "regular",271        "unseen": false,272        "pinned": false,273        "unpinned": null,274        "visible": true,275        "closed": false,276        "archived": false,277        "bookmarked": null,278        "liked": null,279        "tags_descriptions": {},280        "like_count": 0,281        "views": 195,282        "category_id": 1,283        "featured_link": null,284        "has_accepted_answer": false,285        "posters": [286          {287            "extras": "latest",288            "description": "Original Poster, Most Recent Poster",289            "user": {290              "id": 71569,291              "username": "Manvel_Petrosyan",292              "name": "Manvel Petrosyan",293              "avatar_template": "/user_avatar/discuss.pytorch.org/manvel_petrosyan/{size}/66101_2.png",294              "trust_level": 1295            }296          },297          {298            "extras": null,299            "description": "Frequent Poster",300            "user": {301              "id": 3534,302              "username": "ptrblck",303              "name": "",304              "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",305              "admin": true,306              "moderator": true,307              "trust_level": 2308            }309          }310        ]311      },312      {313        "fancy_title": "Will profiler.record_function be affected by the asynchronous execution?",314        "id": 214993,315        "title": "Will profiler.record_function be affected by the asynchronous execution?",316        "slug": "will-profiler-record-function-be-affected-by-the-asynchronous-execution",317        "posts_count": 2,318        "reply_count": 0,319        "highest_post_number": 2,320        "image_url": null,321        "created_at": "2025-01-05T09:31:28.370Z",322        "last_posted_at": "2025-01-05T19:46:14.748Z",323        "bumped": true,324        "bumped_at": "2025-01-05T19:46:14.748Z",325        "archetype": "regular",326        "unseen": false,327        "pinned": false,328        "unpinned": null,329        "visible": true,330        "closed": false,331        "archived": false,332        "bookmarked": null,333        "liked": null,334        "tags_descriptions": {},335        "like_count": 0,336        "views": 41,337        "category_id": 1,338        "featured_link": null,339        "has_accepted_answer": false,340        "posters": [341          {342            "extras": null,343            "description": "Original Poster",344            "user": {345              "id": 81887,346              "username": "ideaV",347              "name": "",348              "avatar_template": "/user_avatar/discuss.pytorch.org/ideav/{size}/74914_2.png",349              "trust_level": 1350            }351          },352          {353            "extras": "latest",354            "description": "Most Recent Poster",355            "user": {356              "id": 41396,357              "username": "soulitzer",358              "name": "",359              "avatar_template": "/letter_avatar_proxy/v4/letter/s/839c29/{size}.png",360              "trust_level": 2361            }362          }363        ]364      },365      {366        "fancy_title": "Error &lsquo;object not callable&rsquo;",367        "id": 219729,368        "title": "Error 'object not callable'",369        "slug": "error-object-not-callable",370        "posts_count": 3,371        "reply_count": 0,372        "highest_post_number": 3,373        "image_url": null,374        "created_at": "2025-05-04T07:18:19.078Z",375        "last_posted_at": "2025-05-06T05:41:24.404Z",376        "bumped": true,377        "bumped_at": "2025-05-06T05:41:24.404Z",378        "archetype": "regular",379        "unseen": false,380        "pinned": false,381        "unpinned": null,382        "visible": true,383        "closed": false,384        "archived": false,385        "bookmarked": null,386        "liked": null,387        "tags_descriptions": {},388        "like_count": 0,389        "views": 92,390        "category_id": 1,391        "featured_link": null,392        "has_accepted_answer": false,393        "posters": [394          {395            "extras": "latest",396            "description": "Original Poster, Most Recent Poster",397            "user": {398              "id": 84139,399              "username": "Abhishek_Sood",400              "name": "Abhishek Sood",401              "avatar_template": "/user_avatar/discuss.pytorch.org/abhishek_sood/{size}/76903_2.png",402              "trust_level": 0403            }404          },405          {406            "extras": null,407            "description": "Frequent Poster",408            "user": {409              "id": 18088,410              "username": "KFrank",411              "name": "K. Frank",412              "avatar_template": "/letter_avatar_proxy/v4/letter/k/ecb155/{size}.png",413              "trust_level": 2414            }415          }416        ]417      }418    ],419    "tags_descriptions": {},420    "fancy_title": "Getting correct output dimensions from an autoencoder taking variable input dimensions",421    "id": 129707,422    "title": "Getting correct output dimensions from an autoencoder taking variable input dimensions",423    "posts_count": 2,424    "created_at": "2021-08-18T23:47:23.935Z",425    "views": 511,426    "reply_count": 0,427    "like_count": 1,428    "last_posted_at": "2021-08-19T05:35:19.186Z",429    "visible": true,430    "closed": false,431    "archived": false,432    "has_summary": false,433    "archetype": "regular",434    "slug": "getting-correct-output-dimensions-from-an-autoencoder-taking-variable-input-dimensions",435    "category_id": 1,436    "word_count": 160,437    "deleted_at": null,438    "user_id": 47218,439    "featured_link": null,440    "pinned_globally": false,441    "pinned_at": null,442    "pinned_until": null,443    "image_url": null,444    "slow_mode_seconds": 0,445    "draft": null,446    "draft_key": "topic_129707",447    "draft_sequence": null,448    "unpinned": null,449    "pinned": false,450    "current_post_number": 1,451    "highest_post_number": 2,452    "deleted_by": null,453    "actions_summary": [454      {455        "id": 4,456        "count": 0,457        "hidden": false,458        "can_act": false459      },460      {461        "id": 8,462        "count": 0,463        "hidden": false,464        "can_act": false465      },466      {467        "id": 10,468        "count": 0,469        "hidden": false,470        "can_act": false471      },472      {473        "id": 7,474        "count": 0,475        "hidden": false,476        "can_act": false477      }478    ],479    "chunk_size": 20,480    "bookmarked": false,481    "topic_timer": null,482    "message_bus_last_id": 0,483    "participant_count": 2,484    "show_read_indicator": false,485    "thumbnails": null,486    "slow_mode_enabled_until": null,487    "can_vote": false,488    "vote_count": 0,489    "user_voted": false,490    "discourse_zendesk_plugin_zendesk_id": null,491    "discourse_zendesk_plugin_zendesk_url": "https://your-url.zendesk.com/agent/tickets/",492    "details": {493      "can_edit": false,494      "notification_level": 1,495      "participants": [496        {497          "id": 3534,498          "username": "ptrblck",499          "name": "",500          "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",501          "post_count": 1,502          "primary_group_name": null,503          "flair_name": null,504          "flair_url": null,505          "flair_color": null,506          "flair_bg_color": null,507          "flair_group_id": null,508          "admin": true,509          "moderator": true,510          "trust_level": 2511        },512        {513          "id": 47218,514          "username": "alee023",515          "name": "Alison",516          "avatar_template": "/user_avatar/discuss.pytorch.org/alee023/{size}/30084_2.png",517          "post_count": 1,518          "primary_group_name": null,519          "flair_name": null,520          "flair_url": null,521          "flair_color": null,522          "flair_bg_color": null,523          "flair_group_id": null,524          "trust_level": 1525        }526      ],527      "created_by": {528        "id": 47218,529        "username": "alee023",530        "name": "Alison",531        "avatar_template": "/user_avatar/discuss.pytorch.org/alee023/{size}/30084_2.png"532      },533      "last_poster": {534        "id": 3534,535        "username": "ptrblck",536        "name": "",537        "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png"538      }539    },540    "bookmarks": []541  },542  {543    "post_stream": {544      "posts": [545        {546          "id": 301894,547          "name": "",548          "username": "nobody",549          "avatar_template": "/letter_avatar_proxy/v4/letter/n/94ad74/{size}.png",550          "created_at": "2021-08-19T05:26:31.268Z",551          "cooked": "<p>I implement a backward function of pos embedding lookup, and I call torch.allclose to verify it with autograd result. My implementation is very simple, as follows:</p>\n<pre><code class=\"lang-auto\"># pos_matrix: [seq_len, seq_len]\n# pos_weight: [max_pos_size, hidden_size]\n# pos_embed: [seq_len, seq_len, hidden_size]\ngrad_weight = torch.zeros((max_pos_size, hidden_size))\nfor i in range(seq_len):\n    for j in range(seq_len):\n        pos = pos_matrix[i, j]\n        grad_weight[pos] += grad_embed[i, j]\n</code></pre>\n<p>It is consistency under FP32(difference &lt; 1e-5), but there is a big difference on FP16(Max absolute difference: 0.0625), and this difference increases as the length of the sequence increases.</p>\n<p>What could cause this difference? The difference of calculation order in cuda code? or fp16 overflow/rounding error? or is there a bug in my implementation?</p>",552          "post_number": 1,553          "post_type": 1,554          "posts_count": 2,555          "updated_at": "2021-08-19T05:27:24.288Z",556          "reply_count": 0,557          "reply_to_post_number": null,558          "quote_count": 0,559          "incoming_link_count": 35,560          "reads": 4,561          "readers_count": 3,562          "score": 175.8,563          "yours": false,564          "topic_id": 129723,565          "topic_slug": "the-backward-realized-by-myself-is-inconsistent-with-autograd-under-fp16",566          "display_username": "",567          "primary_group_name": null,568          "flair_name": null,569          "flair_url": null,570          "flair_bg_color": null,571          "flair_color": null,572          "flair_group_id": null,573          "badges_granted": [],574          "version": 1,575          "can_edit": false,576          "can_delete": false,577          "can_recover": false,578          "can_see_hidden_post": false,579          "can_wiki": false,580          "read": true,581          "user_title": null,582          "bookmarked": false,583          "actions_summary": [],584          "moderator": false,585          "admin": false,586          "staff": false,587          "user_id": 47196,588          "hidden": false,589          "trust_level": 1,590          "deleted_at": null,591          "user_deleted": false,592          "edit_reason": null,593          "can_view_edit_history": true,594          "wiki": false,595          "post_url": "/t/the-backward-realized-by-myself-is-inconsistent-with-autograd-under-fp16/129723/1",596          "can_accept_answer": false,597          "can_unaccept_answer": false,598          "accepted_answer": false,599          "topic_accepted_answer": null,600          "can_vote": false601        },602        {603          "id": 301896,604          "name": "",605          "username": "ptrblck",606          "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",607          "created_at": "2021-08-19T05:31:25.306Z",608          "cooked": "<p>A larger error using <code>float16</code> would be expected and for your particular use case you could check the errors in FP16, FP32, and FP64 to check, if the relative (and abs.) errors decrease in the expected ranges.</p>",609          "post_number": 2,610          "post_type": 1,611          "posts_count": 2,612          "updated_at": "2021-08-19T05:31:25.306Z",613          "reply_count": 0,614          "reply_to_post_number": null,615          "quote_count": 0,616          "incoming_link_count": 0,617          "reads": 4,618          "readers_count": 3,619          "score": 0.8,620          "yours": false,621          "topic_id": 129723,622          "topic_slug": "the-backward-realized-by-myself-is-inconsistent-with-autograd-under-fp16",623          "display_username": "",624          "primary_group_name": null,625          "flair_name": null,626          "flair_url": null,627          "flair_bg_color": null,628          "flair_color": null,629          "flair_group_id": null,630          "badges_granted": [],631          "version": 1,632          "can_edit": false,633          "can_delete": false,634          "can_recover": false,635          "can_see_hidden_post": false,636          "can_wiki": false,637          "read": true,638          "user_title": "",639          "bookmarked": false,640          "actions_summary": [],641          "moderator": true,642          "admin": true,643          "staff": true,644          "user_id": 3534,645          "hidden": false,646          "trust_level": 2,647          "deleted_at": null,648          "user_deleted": false,649          "edit_reason": null,650          "can_view_edit_history": true,651          "wiki": false,652          "post_url": "/t/the-backward-realized-by-myself-is-inconsistent-with-autograd-under-fp16/129723/2",653          "can_accept_answer": false,654          "can_unaccept_answer": false,655          "accepted_answer": false,656          "topic_accepted_answer": null657        }658      ],659      "stream": [660        301894,661        301896662      ]663    },664    "timeline_lookup": [665      [666        1,667        1529668      ]669    ],670    "suggested_topics": [671      {672        "fancy_title": "Cant&rsquo;t find amdgpu.ids when running in venv",673        "id": 214980,674        "title": "Cant't find amdgpu.ids when running in venv",675        "slug": "cantt-find-amdgpu-ids-when-running-in-venv",676        "posts_count": 2,677        "reply_count": 0,678        "highest_post_number": 2,679        "image_url": null,680        "created_at": "2025-01-04T22:49:45.132Z",681        "last_posted_at": "2025-02-26T19:30:12.859Z",682        "bumped": true,683        "bumped_at": "2025-02-26T19:30:12.859Z",684        "archetype": "regular",685        "unseen": false,686        "pinned": false,687        "unpinned": null,688        "visible": true,689        "closed": false,690        "archived": false,691        "bookmarked": null,692        "liked": null,693        "tags_descriptions": {},694        "like_count": 1,695        "views": 514,696        "category_id": 1,697        "featured_link": null,698        "has_accepted_answer": false,699        "posters": [700          {701            "extras": null,702            "description": "Original Poster",703            "user": {704              "id": 81881,705              "username": "Outssiss",706              "name": "Outssiss",707              "avatar_template": "/user_avatar/discuss.pytorch.org/outssiss/{size}/74905_2.png",708              "trust_level": 0709            }710          },711          {712            "extras": "latest",713            "description": "Most Recent Poster",714            "user": {715              "id": 82743,716              "username": "fngarrett",717              "name": "Garrett",718              "avatar_template": "/letter_avatar_proxy/v4/letter/f/e79b87/{size}.png",719              "trust_level": 1720            }721          }722        ]723      },724      {725        "fancy_title": "Convert pythorch pth model to onnx with fixed width and variable height",726        "id": 214369,727        "title": "Convert pythorch pth model to onnx with fixed width and variable height",728        "slug": "convert-pythorch-pth-model-to-onnx-with-fixed-width-and-variable-height",729        "posts_count": 2,730        "reply_count": 0,731        "highest_post_number": 2,732        "image_url": null,733        "created_at": "2024-12-18T17:51:10.145Z",734        "last_posted_at": "2025-03-06T21:08:07.809Z",735        "bumped": true,736        "bumped_at": "2025-03-06T21:08:07.809Z",737        "archetype": "regular",738        "unseen": false,739        "pinned": false,740        "unpinned": null,741        "visible": true,742        "closed": false,743        "archived": false,744        "bookmarked": null,745        "liked": null,746        "tags_descriptions": {},747        "like_count": 0,748        "views": 140,749        "category_id": 1,750        "featured_link": null,751        "has_accepted_answer": false,752        "posters": [753          {754            "extras": "latest single",755            "description": "Original Poster, Most Recent Poster",756            "user": {757              "id": 64571,758              "username": "Alan_S",759              "name": "Alan S",760              "avatar_template": "/user_avatar/discuss.pytorch.org/alan_s/{size}/58732_2.png",761              "trust_level": 0762            }763          }764        ]765      },766      {767        "fancy_title": "Lazy.h produces many compiler errors in UE project",768        "id": 212921,769        "title": "Lazy.h produces many compiler errors in UE project",770        "slug": "lazy-h-produces-many-compiler-errors-in-ue-project",771        "posts_count": 2,772        "reply_count": 0,773        "highest_post_number": 3,774        "image_url": null,775        "created_at": "2024-11-13T11:29:12.008Z",776        "last_posted_at": "2024-11-21T15:12:42.241Z",777        "bumped": true,778        "bumped_at": "2024-11-21T15:12:42.241Z",779        "archetype": "regular",780        "unseen": false,781        "pinned": false,782        "unpinned": null,783        "visible": true,784        "closed": false,785        "archived": false,786        "bookmarked": null,787        "liked": null,788        "tags_descriptions": {},789        "like_count": 1,790        "views": 137,791        "category_id": 1,792        "featured_link": null,793        "has_accepted_answer": false,794        "posters": [795          {796            "extras": null,797            "description": "Original Poster",798            "user": {799              "id": 74486,800              "username": "lavoos",801              "name": "lavoos",802              "avatar_template": "/letter_avatar_proxy/v4/letter/l/85f322/{size}.png",803              "trust_level": 1804            }805          },806          {807            "extras": "latest",808            "description": "Most Recent Poster",809            "user": {810              "id": 32206,811              "username": "sachithpd",812              "name": "Sachith Dickwella",813              "avatar_template": "/user_avatar/discuss.pytorch.org/sachithpd/{size}/25053_2.png",814              "trust_level": 1815            }816          }817        ]818      },819      {820        "fancy_title": "RuntimeError: invalid dtype for bias - should match query&rsquo;s dtype #144018",821        "id": 214902,822        "title": "RuntimeError: invalid dtype for bias - should match query's dtype #144018",823        "slug": "runtimeerror-invalid-dtype-for-bias-should-match-querys-dtype-144018",824        "posts_count": 3,825        "reply_count": 1,826        "highest_post_number": 3,827        "image_url": null,828        "created_at": "2025-01-02T18:43:16.682Z",829        "last_posted_at": "2025-01-06T05:01:52.408Z",830        "bumped": true,831        "bumped_at": "2025-01-06T05:01:52.408Z",832        "archetype": "regular",833        "unseen": false,834        "pinned": false,835        "unpinned": null,836        "visible": true,837        "closed": false,838        "archived": false,839        "bookmarked": null,840        "liked": null,841        "tags_descriptions": {},842        "like_count": 1,843        "views": 284,844        "category_id": 1,845        "featured_link": null,846        "has_accepted_answer": true,847        "posters": [848          {849            "extras": "latest",850            "description": "Original Poster, Most Recent Poster, Accepted Answer",851            "user": {852              "id": 37719,853              "username": "Hayat_Ullah",854              "name": "Hayat Ullah",855              "avatar_template": "/user_avatar/discuss.pytorch.org/hayat_ullah/{size}/74922_2.png",856              "trust_level": 1857            }858          },859          {860            "extras": null,861            "description": "Frequent Poster",862            "user": {863              "id": 3534,864              "username": "ptrblck",865              "name": "",866              "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",867              "admin": true,868              "moderator": true,869              "trust_level": 2870            }871          }872        ]873      },874      {875        "fancy_title": "Can ResNet50() takes as input a tensor of shape (1, 3, 95, 64) and output another tensor of same shape (1, 3, 95, 64)",876        "id": 215407,877        "title": "Can ResNet50() takes as input a tensor of shape (1, 3, 95, 64) and output another tensor of same shape (1, 3, 95, 64)",878        "slug": "can-resnet50-takes-as-input-a-tensor-of-shape-1-3-95-64-and-output-another-tensor-of-same-shape-1-3-95-64",879        "posts_count": 2,880        "reply_count": 0,881        "highest_post_number": 2,882        "image_url": null,883        "created_at": "2025-01-15T06:23:30.784Z",884        "last_posted_at": "2025-01-15T14:07:53.919Z",885        "bumped": true,886        "bumped_at": "2025-01-15T14:07:53.919Z",887        "archetype": "regular",888        "unseen": false,889        "pinned": false,890        "unpinned": null,891        "visible": true,892        "closed": false,893        "archived": false,894        "bookmarked": null,895        "liked": null,896        "tags_descriptions": {},897        "like_count": 0,898        "views": 39,899        "category_id": 1,900        "featured_link": null,901        "has_accepted_answer": false,902        "posters": [903          {904            "extras": null,905            "description": "Original Poster",906            "user": {907              "id": 81774,908              "username": "Thierry_Roger_Bayala",909              "name": "Thierry Roger Bayala",910              "avatar_template": "/user_avatar/discuss.pytorch.org/thierry_roger_bayala/{size}/74787_2.png",911              "trust_level": 1912            }913          },914          {915            "extras": "latest",916            "description": "Most Recent Poster",917            "user": {918              "id": 3534,919              "username": "ptrblck",920              "name": "",921              "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",922              "admin": true,923              "moderator": true,924              "trust_level": 2925            }926          }927        ]928      }929    ],930    "tags_descriptions": {},931    "fancy_title": "The backward realized by myself is inconsistent with autograd under fp16",932    "id": 129723,933    "title": "The backward realized by myself is inconsistent with autograd under fp16",934    "posts_count": 2,935    "created_at": "2021-08-19T05:26:31.207Z",936    "views": 286,937    "reply_count": 0,938    "like_count": 0,939    "last_posted_at": "2021-08-19T05:31:25.306Z",940    "visible": true,941    "closed": false,942    "archived": false,943    "has_summary": false,944    "archetype": "regular",945    "slug": "the-backward-realized-by-myself-is-inconsistent-with-autograd-under-fp16",946    "category_id": 1,947    "word_count": 156,948    "deleted_at": null,949    "user_id": 47196,950    "featured_link": null,951    "pinned_globally": false,952    "pinned_at": null,953    "pinned_until": null,954    "image_url": null,955    "slow_mode_seconds": 0,956    "draft": null,957    "draft_key": "topic_129723",958    "draft_sequence": null,959    "unpinned": null,960    "pinned": false,961    "current_post_number": 1,962    "highest_post_number": 2,963    "deleted_by": null,964    "actions_summary": [965      {966        "id": 4,967        "count": 0,968        "hidden": false,969        "can_act": false970      },971      {972        "id": 8,973        "count": 0,974        "hidden": false,975        "can_act": false976      },977      {978        "id": 10,979        "count": 0,980        "hidden": false,981        "can_act": false982      },983      {984        "id": 7,985        "count": 0,986        "hidden": false,987        "can_act": false988      }989    ],990    "chunk_size": 20,991    "bookmarked": false,992    "topic_timer": null,993    "message_bus_last_id": 0,994    "participant_count": 2,995    "show_read_indicator": false,996    "thumbnails": null,997    "slow_mode_enabled_until": null,998    "can_vote": false,999    "vote_count": 0,1000    "user_voted": false,1001    "discourse_zendesk_plugin_zendesk_id": null,1002    "discourse_zendesk_plugin_zendesk_url": "https://your-url.zendesk.com/agent/tickets/",1003    "details": {1004      "can_edit": false,1005      "notification_level": 1,1006      "participants": [1007        {1008          "id": 3534,1009          "username": "ptrblck",1010          "name": "",1011          "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",1012          "post_count": 1,1013          "primary_group_name": null,1014          "flair_name": null,1015          "flair_url": null,1016          "flair_color": null,1017          "flair_bg_color": null,1018          "flair_group_id": null,1019          "admin": true,1020          "moderator": true,1021          "trust_level": 21022        },1023        {1024          "id": 47196,1025          "username": "nobody",1026          "name": "",1027          "avatar_template": "/letter_avatar_proxy/v4/letter/n/94ad74/{size}.png",1028          "post_count": 1,1029          "primary_group_name": null,1030          "flair_name": null,1031          "flair_url": null,1032          "flair_color": null,1033          "flair_bg_color": null,1034          "flair_group_id": null,1035          "trust_level": 11036        }1037      ],1038      "created_by": {1039        "id": 47196,1040        "username": "nobody",1041        "name": "",1042        "avatar_template": "/letter_avatar_proxy/v4/letter/n/94ad74/{size}.png"1043      },1044      "last_poster": {1045        "id": 3534,1046        "username": "ptrblck",1047        "name": "",1048        "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png"1049      }1050    },1051    "bookmarks": []1052  },1053  {1054    "post_stream": {1055      "posts": [1056        {1057          "id": 301768,1058          "name": "marc_q",1059          "username": "marc_q",1060          "avatar_template": "/letter_avatar_proxy/v4/letter/m/fbc32d/{size}.png",1061          "created_at": "2021-08-18T09:23:54.122Z",1062          "cooked": "<p>Hello!<br>\nFollowing the official tutorial, I am trying to convert a torch modle to a torch script. I am worried about how to ensure the correctness of the torch script. When convert a pytorch model to torch script via tracing(resnet18 as an example), official code shows to use a example input torch.rand(1,3,224,224) to get a traced_script_module. And then, feed the module a torch.ones(1,3,224,224) to get a output tensor. But I get different outputs when feed same torch.ones(1,3,224,224). Just because the example torch.rand(1,3,224,224)s are different. How to ensure that the results are correct, when feed real images.<br>\nthanks.<br>\n<div class=\"lightbox-wrapper\"><a class=\"lightbox\" href=\"https://discuss.pytorch.org/uploads/default/original/3X/e/5/e519612a54acc7efd6966d6a56422441351cf36d.jpeg\" data-download-href=\"https://discuss.pytorch.org/uploads/default/e519612a54acc7efd6966d6a56422441351cf36d\" title=\"res\"><img src=\"https://discuss.pytorch.org/uploads/default/optimized/3X/e/5/e519612a54acc7efd6966d6a56422441351cf36d_2_690x402.jpeg\" alt=\"res\" data-base62-sha1=\"wGHIoXYyPrzz2wvccgTBNkNzmwt\" width=\"690\" height=\"402\" srcset=\"https://discuss.pytorch.org/uploads/default/optimized/3X/e/5/e519612a54acc7efd6966d6a56422441351cf36d_2_690x402.jpeg, https://discuss.pytorch.org/uploads/default/optimized/3X/e/5/e519612a54acc7efd6966d6a56422441351cf36d_2_1035x603.jpeg 1.5x, https://discuss.pytorch.org/uploads/default/optimized/3X/e/5/e519612a54acc7efd6966d6a56422441351cf36d_2_1380x804.jpeg 2x\" data-dominant-color=\"EBEDF0\"><div class=\"meta\"><svg class=\"fa d-icon d-icon-far-image svg-icon\" aria-hidden=\"true\"><use href=\"#far-image\"></use></svg><span class=\"filename\">res</span><span class=\"informations\">1588×926 134 KB</span><svg class=\"fa d-icon d-icon-discourse-expand svg-icon\" aria-hidden=\"true\"><use href=\"#discourse-expand\"></use></svg></div></a></div></p>",1063          "post_number": 1,1064          "post_type": 1,1065          "posts_count": 5,1066          "updated_at": "2021-08-18T09:23:54.122Z",1067          "reply_count": 0,1068          "reply_to_post_number": null,1069          "quote_count": 0,1070          "incoming_link_count": 313,1071          "reads": 12,1072          "readers_count": 11,1073          "score": 1562.4,1074          "yours": false,1075          "topic_id": 129655,1076          "topic_slug": "how-to-ensure-the-correctness-of-the-torch-script",1077          "display_username": "marc_q",1078          "primary_group_name": null,1079          "flair_name": null,1080          "flair_url": null,1081          "flair_bg_color": null,1082          "flair_color": null,1083          "flair_group_id": null,1084          "badges_granted": [],1085          "version": 1,1086          "can_edit": false,1087          "can_delete": false,1088          "can_recover": false,1089          "can_see_hidden_post": false,1090          "can_wiki": false,1091          "link_counts": [1092            {1093              "url": "https://discuss.pytorch.org/uploads/default/original/3X/e/5/e519612a54acc7efd6966d6a56422441351cf36d.jpeg",1094              "internal": true,1095              "reflection": false,1096              "clicks": 01097            }1098          ],1099          "read": true,1100          "user_title": null,1101          "bookmarked": false,1102          "actions_summary": [],1103          "moderator": false,1104          "admin": false,1105          "staff": false,1106          "user_id": 48228,1107          "hidden": false,1108          "trust_level": 0,1109          "deleted_at": null,1110          "user_deleted": false,1111          "edit_reason": null,1112          "can_view_edit_history": true,1113          "wiki": false,1114          "post_url": "/t/how-to-ensure-the-correctness-of-the-torch-script/129655/1",1115          "can_accept_answer": false,1116          "can_unaccept_answer": false,1117          "accepted_answer": false,1118          "topic_accepted_answer": true,1119          "can_vote": false1120        },1121        {1122          "id": 301851,1123          "name": "",1124          "username": "ptrblck",1125          "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",1126          "created_at": "2021-08-18T19:14:39.997Z",1127          "cooked": "<p>I cannot reproduce the issue using <code>resnet18</code> as seen here:</p>\n<pre><code class=\"lang-python\">model = models.resnet18()\nx = torch.randn(1, 3, 224, 224)\nmodel_traced = torch.jit.trace(model, x)\n\nout = model(torch.ones(1, 3, 224, 224))\nout_traced = model(torch.ones(1, 3, 224, 224))\nprint((out - out_traced).abs().max())\n&gt; tensor(0., grad_fn=&lt;MaxBackward1&gt;)\n</code></pre>\n<p>In case you are using a different model, make sure the traced model uses the same “code path” as the eager model (e.g. in case data-dependent control flow is used inside the model or dropout etc.).</p>\n<p>EDIT: the tracer should also raise a warning e.g. if dropout was used in <code>training</code> mode:</p>\n<pre><code class=\"lang-python\">TracerWarning: Trace had nondeterministic nodes. Did you forget call .eval() on your model?\n</code></pre>",1128          "post_number": 2,1129          "post_type": 1,1130          "posts_count": 5,1131          "updated_at": "2021-08-18T19:15:59.955Z",1132          "reply_count": 1,1133          "reply_to_post_number": null,1134          "quote_count": 0,1135          "incoming_link_count": 4,1136          "reads": 11,1137          "readers_count": 10,1138          "score": 27.2,1139          "yours": false,1140          "topic_id": 129655,1141          "topic_slug": "how-to-ensure-the-correctness-of-the-torch-script",1142          "display_username": "",1143          "primary_group_name": null,1144          "flair_name": null,1145          "flair_url": null,1146          "flair_bg_color": null,1147          "flair_color": null,1148          "flair_group_id": null,1149          "badges_granted": [],1150          "version": 1,1151          "can_edit": false,1152          "can_delete": false,1153          "can_recover": false,1154          "can_see_hidden_post": false,1155          "can_wiki": false,1156          "read": true,1157          "user_title": "",1158          "bookmarked": false,1159          "actions_summary": [],1160          "moderator": true,1161          "admin": true,1162          "staff": true,1163          "user_id": 3534,1164          "hidden": false,1165          "trust_level": 2,1166          "deleted_at": null,1167          "user_deleted": false,1168          "edit_reason": null,1169          "can_view_edit_history": true,1170          "wiki": false,1171          "post_url": "/t/how-to-ensure-the-correctness-of-the-torch-script/129655/2",1172          "can_accept_answer": false,1173          "can_unaccept_answer": false,1174          "accepted_answer": false,1175          "topic_accepted_answer": true1176        },1177        {1178          "id": 301879,1179          "name": "marc_q",1180          "username": "marc_q",1181          "avatar_template": "/letter_avatar_proxy/v4/letter/m/fbc32d/{size}.png",1182          "created_at": "2021-08-19T03:07:26.647Z",1183          "cooked": "<p>Thanks for your attention.<br>\nI can reproduce this issue by run code twice.</p>\n<pre><code class=\"lang-auto\">model = torchvision.models.resnet18()\n# An example input you would normally provide to your model's forward() method.\nexample = torch.rand(1, 3, 224, 224)\n# Use torch.jit.trace to generate a torch.jit.ScriptModule via tracing.\ntraced_script_module = torch.jit.trace(model, example)\n\noutput = traced_script_module.forward(torch.ones(1,3,224,224))\ntraced_script_module.save(\"traced_resnet_model.pt\")\n#eg: first get: tensor([-0.0645,  0.1313, -0.3563, -0.0869,  0.3209], grad_fn=&lt;SliceBackward&gt;)\n#   second get: tensor([-0.1508, -0.2974,  0.0963, -0.1596, -0.7377], grad_fn=&lt;SliceBackward&gt;)\nprint(output[0, :5])\n</code></pre>\n<p>Basing code above,i run it first get tensor [-0.0645,  0.1313, -0.3563, -0.0869,  0.3209], and i try to run it again, i will get tensor[-0.1508, -0.2974,  0.0963, -0.1596, -0.7377]. The only difference between two procedures are var example. it seems to generate diffenent traced script. Besides, i compared to binary traced_resnet_model.pts, they are absolutly different,as shown below.</p>\n<pre><code class=\"lang-auto\">&gt;&gt; cmp traced_resnet_model_1.pt traced_resnet_model_2.pt \n&gt;&gt; raced_resnet_model_1.pt traced_resnet_model_2.pt differ: char 51, line 1\n</code></pre>\n<p><div class=\"lightbox-wrapper\"><a class=\"lightbox\" href=\"https://discuss.pytorch.org/uploads/default/original/3X/5/7/578804416ce8178c6bbf2cc0f40580bc6b82ff67.jpeg\" data-download-href=\"https://discuss.pytorch.org/uploads/default/578804416ce8178c6bbf2cc0f40580bc6b82ff67\" title=\"image\"><img src=\"https://discuss.pytorch.org/uploads/default/optimized/3X/5/7/578804416ce8178c6bbf2cc0f40580bc6b82ff67_2_690x158.jpeg\" alt=\"image\" data-base62-sha1=\"cukX9WHAPtvZvqtPaeH3kBvSbWf\" width=\"690\" height=\"158\" srcset=\"https://discuss.pytorch.org/uploads/default/optimized/3X/5/7/578804416ce8178c6bbf2cc0f40580bc6b82ff67_2_690x158.jpeg, https://discuss.pytorch.org/uploads/default/optimized/3X/5/7/578804416ce8178c6bbf2cc0f40580bc6b82ff67_2_1035x237.jpeg 1.5x, https://discuss.pytorch.org/uploads/default/optimized/3X/5/7/578804416ce8178c6bbf2cc0f40580bc6b82ff67_2_1380x316.jpeg 2x\" data-dominant-color=\"EDC3C6\"><div class=\"meta\"><svg class=\"fa d-icon d-icon-far-image svg-icon\" aria-hidden=\"true\"><use href=\"#far-image\"></use></svg><span class=\"filename\">image</span><span class=\"informations\">1920×441 189 KB</span><svg class=\"fa d-icon d-icon-discourse-expand svg-icon\" aria-hidden=\"true\"><use href=\"#discourse-expand\"></use></svg></div></a></div></p>",1184          "post_number": 3,1185          "post_type": 1,1186          "posts_count": 5,1187          "updated_at": "2021-08-19T03:13:54.887Z",1188          "reply_count": 1,1189          "reply_to_post_number": 2,1190          "quote_count": 0,1191          "incoming_link_count": 4,1192          "reads": 10,1193          "readers_count": 9,1194          "score": 27.0,1195          "yours": false,1196          "topic_id": 129655,1197          "topic_slug": "how-to-ensure-the-correctness-of-the-torch-script",1198          "display_username": "marc_q",1199          "primary_group_name": null,1200          "flair_name": null,

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