Anurag1734/cuda-error-resolution-analysis
07
1[2 {3 "post_stream": {4 "posts": [5 {6 "id": 301812,7 "name": null,8 "username": "Tom_F",9 "avatar_template": "/letter_avatar_proxy/v4/letter/t/edb3f5/{size}.png",10 "created_at": "2021-08-18T13:54:51.155Z",11 "cooked": "<p>Is there an easy way to access the last layer in a torchvision model, without coding a special version for each type of model as described in this tutorial: <a href=\"https://pytorch.org/tutorials/beginner/finetuning_torchvision_models_tutorial.html\" class=\"inline-onebox\" rel=\"noopener nofollow ugc\">Finetuning Torchvision Models — PyTorch Tutorials 1.2.0 documentation</a></p>\n<p>Ie. the problem is that the last layer has different names for different pretrained models, like “fc” for ResNet, “classifier” for DenseNet etc. I tried to access the layer like accessing an OrderedDict (d.items()…) but didn’t succeed.</p>",12 "post_number": 1,13 "post_type": 1,14 "posts_count": 3,15 "updated_at": "2021-08-18T13:54:51.155Z",16 "reply_count": 0,17 "reply_to_post_number": null,18 "quote_count": 0,19 "incoming_link_count": 2635,20 "reads": 41,21 "readers_count": 40,22 "score": 13138.2,23 "yours": false,24 "topic_id": 129682,25 "topic_slug": "accessing-last-layer-in-torchvision-model-in-a-general-way",26 "display_username": null,27 "primary_group_name": null,28 "flair_name": null,29 "flair_url": null,30 "flair_bg_color": null,31 "flair_color": null,32 "flair_group_id": null,33 "badges_granted": [],34 "version": 1,35 "can_edit": false,36 "can_delete": false,37 "can_recover": false,38 "can_see_hidden_post": false,39 "can_wiki": false,40 "link_counts": [41 {42 "url": "https://pytorch.org/tutorials/beginner/finetuning_torchvision_models_tutorial.html",43 "internal": false,44 "reflection": false,45 "title": "Finetuning Torchvision Models — PyTorch Tutorials 1.2.0 documentation",46 "clicks": 6947 }48 ],49 "read": true,50 "user_title": null,51 "bookmarked": false,52 "actions_summary": [],53 "moderator": false,54 "admin": false,55 "staff": false,56 "user_id": 46499,57 "hidden": false,58 "trust_level": 1,59 "deleted_at": null,60 "user_deleted": false,61 "edit_reason": null,62 "can_view_edit_history": true,63 "wiki": false,64 "post_url": "/t/accessing-last-layer-in-torchvision-model-in-a-general-way/129682/1",65 "can_accept_answer": false,66 "can_unaccept_answer": false,67 "accepted_answer": false,68 "topic_accepted_answer": true,69 "can_vote": false70 },71 {72 "id": 301907,73 "name": "",74 "username": "ptrblck",75 "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",76 "created_at": "2021-08-19T06:06:51.915Z",77 "cooked": "<p>I don’t believe there is a safe way to get the last layer, since even indexing the last module from <code>model.children()</code> would return the module initialized last and not necessarily the layer used last in the <code>forward</code>. Since your model could use different execution path in the <code>forward</code> (e.g. Inception models return either the final logits or additionally the aux. logits as well), the cleanest way would be to check the <code>forward</code> of each model and make sure you are indeed replacing the “last” layer.</p>",78 "post_number": 2,79 "post_type": 1,80 "posts_count": 3,81 "updated_at": "2021-08-22T17:52:47.100Z",82 "reply_count": 1,83 "reply_to_post_number": null,84 "quote_count": 0,85 "incoming_link_count": 15,86 "reads": 39,87 "readers_count": 38,88 "score": 102.8,89 "yours": false,90 "topic_id": 129682,91 "topic_slug": "accessing-last-layer-in-torchvision-model-in-a-general-way",92 "display_username": "",93 "primary_group_name": null,94 "flair_name": null,95 "flair_url": null,96 "flair_bg_color": null,97 "flair_color": null,98 "flair_group_id": null,99 "badges_granted": [],100 "version": 1,101 "can_edit": false,102 "can_delete": false,103 "can_recover": false,104 "can_see_hidden_post": false,105 "can_wiki": false,106 "read": true,107 "user_title": "",108 "bookmarked": false,109 "actions_summary": [110 {111 "id": 2,112 "count": 1113 }114 ],115 "moderator": true,116 "admin": true,117 "staff": true,118 "user_id": 3534,119 "hidden": false,120 "trust_level": 2,121 "deleted_at": null,122 "user_deleted": false,123 "edit_reason": null,124 "can_view_edit_history": true,125 "wiki": false,126 "post_url": "/t/accessing-last-layer-in-torchvision-model-in-a-general-way/129682/2",127 "can_accept_answer": false,128 "can_unaccept_answer": false,129 "accepted_answer": true,130 "topic_accepted_answer": true131 },132 {133 "id": 302504,134 "name": null,135 "username": "Tom_F",136 "avatar_template": "/letter_avatar_proxy/v4/letter/t/edb3f5/{size}.png",137 "created_at": "2021-08-22T17:54:41.310Z",138 "cooked": "<p>Thanks for the quick reply! I hadn’t thought about the extra complexity of different forward methods.</p>",139 "post_number": 3,140 "post_type": 1,141 "posts_count": 3,142 "updated_at": "2021-08-22T17:54:41.310Z",143 "reply_count": 0,144 "reply_to_post_number": 2,145 "quote_count": 0,146 "incoming_link_count": 7,147 "reads": 38,148 "readers_count": 37,149 "score": 42.6,150 "yours": false,151 "topic_id": 129682,152 "topic_slug": "accessing-last-layer-in-torchvision-model-in-a-general-way",153 "display_username": null,154 "primary_group_name": null,155 "flair_name": null,156 "flair_url": null,157 "flair_bg_color": null,158 "flair_color": null,159 "flair_group_id": null,160 "badges_granted": [],161 "version": 1,162 "can_edit": false,163 "can_delete": false,164 "can_recover": false,165 "can_see_hidden_post": false,166 "can_wiki": false,167 "read": true,168 "user_title": null,169 "reply_to_user": {170 "id": 3534,171 "username": "ptrblck",172 "name": "",173 "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png"174 },175 "bookmarked": false,176 "actions_summary": [],177 "moderator": false,178 "admin": false,179 "staff": false,180 "user_id": 46499,181 "hidden": false,182 "trust_level": 1,183 "deleted_at": null,184 "user_deleted": false,185 "edit_reason": null,186 "can_view_edit_history": true,187 "wiki": false,188 "post_url": "/t/accessing-last-layer-in-torchvision-model-in-a-general-way/129682/3",189 "can_accept_answer": false,190 "can_unaccept_answer": false,191 "accepted_answer": false,192 "topic_accepted_answer": true193 }194 ],195 "stream": [196 301812,197 301907,198 302504199 ]200 },201 "timeline_lookup": [202 [203 1,204 1529205 ],206 [207 3,208 1525209 ]210 ],211 "suggested_topics": [212 {213 "fancy_title": "Where to find the compiling scripts or the detailed build configurations used by PyTorch",214 "id": 212279,215 "title": "Where to find the compiling scripts or the detailed build configurations used by PyTorch",216 "slug": "where-to-find-the-compiling-scripts-or-the-detailed-build-configurations-used-by-pytorch",217 "posts_count": 1,218 "reply_count": 0,219 "highest_post_number": 1,220 "image_url": null,221 "created_at": "2024-10-29T14:57:49.935Z",222 "last_posted_at": "2024-10-29T14:57:49.985Z",223 "bumped": true,224 "bumped_at": "2024-10-29T14:57:49.985Z",225 "archetype": "regular",226 "unseen": false,227 "pinned": false,228 "unpinned": null,229 "visible": true,230 "closed": false,231 "archived": false,232 "bookmarked": null,233 "liked": null,234 "tags_descriptions": {},235 "like_count": 0,236 "views": 23,237 "category_id": 1,238 "featured_link": null,239 "has_accepted_answer": false,240 "posters": [241 {242 "extras": "latest single",243 "description": "Original Poster, Most Recent Poster",244 "user": {245 "id": 74705,246 "username": "LamForest",247 "name": "Gao Tianlin",248 "avatar_template": "/user_avatar/discuss.pytorch.org/lamforest/{size}/68981_2.png",249 "trust_level": 1250 }251 }252 ]253 },254 {255 "fancy_title": "Unexpected Behavior with Weight Sharing between nn.Linear and nn.Embedding",256 "id": 212223,257 "title": "Unexpected Behavior with Weight Sharing between nn.Linear and nn.Embedding",258 "slug": "unexpected-behavior-with-weight-sharing-between-nn-linear-and-nn-embedding",259 "posts_count": 3,260 "reply_count": 1,261 "highest_post_number": 3,262 "image_url": null,263 "created_at": "2024-10-28T22:58:14.282Z",264 "last_posted_at": "2024-10-29T00:47:09.870Z",265 "bumped": true,266 "bumped_at": "2024-10-29T00:47:09.870Z",267 "archetype": "regular",268 "unseen": false,269 "pinned": false,270 "unpinned": null,271 "visible": true,272 "closed": false,273 "archived": false,274 "bookmarked": null,275 "liked": null,276 "tags_descriptions": {},277 "like_count": 1,278 "views": 58,279 "category_id": 1,280 "featured_link": null,281 "has_accepted_answer": false,282 "posters": [283 {284 "extras": "latest",285 "description": "Original Poster, Most Recent Poster",286 "user": {287 "id": 59149,288 "username": "samlk",289 "name": "Kryštof Šaml",290 "avatar_template": "/letter_avatar_proxy/v4/letter/s/c57346/{size}.png",291 "trust_level": 1292 }293 },294 {295 "extras": null,296 "description": "Frequent Poster",297 "user": {298 "id": 3534,299 "username": "ptrblck",300 "name": "",301 "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",302 "admin": true,303 "moderator": true,304 "trust_level": 2305 }306 }307 ]308 },309 {310 "fancy_title": "Torch.multiprocessing.spawn hangs after completion",311 "id": 213438,312 "title": "Torch.multiprocessing.spawn hangs after completion",313 "slug": "torch-multiprocessing-spawn-hangs-after-completion",314 "posts_count": 1,315 "reply_count": 0,316 "highest_post_number": 1,317 "image_url": null,318 "created_at": "2024-11-26T05:21:23.247Z",319 "last_posted_at": "2024-11-26T05:21:23.290Z",320 "bumped": true,321 "bumped_at": "2024-11-26T05:21:23.290Z",322 "archetype": "regular",323 "unseen": false,324 "pinned": false,325 "unpinned": null,326 "visible": true,327 "closed": false,328 "archived": false,329 "bookmarked": null,330 "liked": null,331 "tags_descriptions": {},332 "like_count": 0,333 "views": 153,334 "category_id": 1,335 "featured_link": null,336 "has_accepted_answer": false,337 "posters": [338 {339 "extras": "latest single",340 "description": "Original Poster, Most Recent Poster",341 "user": {342 "id": 81124,343 "username": "paullintilhac",344 "name": "Paul Lintilhac",345 "avatar_template": "/user_avatar/discuss.pytorch.org/paullintilhac/{size}/74200_2.png",346 "trust_level": 0347 }348 }349 ]350 },351 {352 "fancy_title": "Setting max_split_size_mb",353 "id": 216065,354 "title": "Setting max_split_size_mb",355 "slug": "setting-max-split-size-mb",356 "posts_count": 1,357 "reply_count": 0,358 "highest_post_number": 1,359 "image_url": null,360 "created_at": "2025-01-30T17:00:10.160Z",361 "last_posted_at": "2025-01-30T17:00:10.203Z",362 "bumped": true,363 "bumped_at": "2025-01-30T17:00:10.203Z",364 "archetype": "regular",365 "unseen": false,366 "pinned": false,367 "unpinned": null,368 "visible": true,369 "closed": false,370 "archived": false,371 "bookmarked": null,372 "liked": null,373 "tags_descriptions": {},374 "like_count": 0,375 "views": 178,376 "category_id": 1,377 "featured_link": null,378 "has_accepted_answer": false,379 "posters": [380 {381 "extras": "latest single",382 "description": "Original Poster, Most Recent Poster",383 "user": {384 "id": 82406,385 "username": "tpg4876",386 "name": "",387 "avatar_template": "/letter_avatar_proxy/v4/letter/t/ed8c4c/{size}.png",388 "trust_level": 0389 }390 }391 ]392 },393 {394 "fancy_title": "Limiting PyTorch Worker Thread Memory Usage",395 "id": 216585,396 "title": "Limiting PyTorch Worker Thread Memory Usage",397 "slug": "limiting-pytorch-worker-thread-memory-usage",398 "posts_count": 1,399 "reply_count": 0,400 "highest_post_number": 1,401 "image_url": null,402 "created_at": "2025-02-12T16:21:25.234Z",403 "last_posted_at": "2025-02-12T16:21:25.284Z",404 "bumped": true,405 "bumped_at": "2025-02-12T16:21:25.284Z",406 "archetype": "regular",407 "unseen": false,408 "pinned": false,409 "unpinned": null,410 "visible": true,411 "closed": false,412 "archived": false,413 "bookmarked": null,414 "liked": null,415 "tags_descriptions": {},416 "like_count": 0,417 "views": 58,418 "category_id": 1,419 "featured_link": null,420 "has_accepted_answer": false,421 "posters": [422 {423 "extras": "latest single",424 "description": "Original Poster, Most Recent Poster",425 "user": {426 "id": 82544,427 "username": "saff",428 "name": "",429 "avatar_template": "/user_avatar/discuss.pytorch.org/saff/{size}/75527_2.png",430 "trust_level": 1431 }432 }433 ]434 }435 ],436 "tags_descriptions": {},437 "fancy_title": "Accessing last layer in torchvision model in a general way",438 "id": 129682,439 "title": "Accessing last layer in torchvision model in a general way",440 "posts_count": 3,441 "created_at": "2021-08-18T13:54:51.093Z",442 "views": 3091,443 "reply_count": 1,444 "like_count": 1,445 "last_posted_at": "2021-08-22T17:54:41.310Z",446 "visible": true,447 "closed": false,448 "archived": false,449 "has_summary": false,450 "archetype": "regular",451 "slug": "accessing-last-layer-in-torchvision-model-in-a-general-way",452 "category_id": 1,453 "word_count": 180,454 "deleted_at": null,455 "user_id": 46499,456 "featured_link": null,457 "pinned_globally": false,458 "pinned_at": null,459 "pinned_until": null,460 "image_url": null,461 "slow_mode_seconds": 0,462 "draft": null,463 "draft_key": "topic_129682",464 "draft_sequence": null,465 "unpinned": null,466 "pinned": false,467 "current_post_number": 1,468 "highest_post_number": 3,469 "deleted_by": null,470 "actions_summary": [471 {472 "id": 4,473 "count": 0,474 "hidden": false,475 "can_act": false476 },477 {478 "id": 8,479 "count": 0,480 "hidden": false,481 "can_act": false482 },483 {484 "id": 10,485 "count": 0,486 "hidden": false,487 "can_act": false488 },489 {490 "id": 7,491 "count": 0,492 "hidden": false,493 "can_act": false494 }495 ],496 "chunk_size": 20,497 "bookmarked": false,498 "topic_timer": null,499 "message_bus_last_id": 0,500 "participant_count": 2,501 "show_read_indicator": false,502 "thumbnails": null,503 "slow_mode_enabled_until": null,504 "accepted_answer": {505 "post_number": 2,506 "username": "ptrblck",507 "name": "",508 "excerpt": "I don’t believe there is a safe way to get the last layer, since even indexing the last module from model.children() would return the module initialized last and not necessarily the layer used last in the forward. Since your model could use different execution path in the forward (e.g. Inception mod…"509 },510 "can_vote": false,511 "vote_count": 0,512 "user_voted": false,513 "discourse_zendesk_plugin_zendesk_id": null,514 "discourse_zendesk_plugin_zendesk_url": "https://your-url.zendesk.com/agent/tickets/",515 "details": {516 "can_edit": false,517 "notification_level": 1,518 "participants": [519 {520 "id": 46499,521 "username": "Tom_F",522 "name": null,523 "avatar_template": "/letter_avatar_proxy/v4/letter/t/edb3f5/{size}.png",524 "post_count": 2,525 "primary_group_name": null,526 "flair_name": null,527 "flair_url": null,528 "flair_color": null,529 "flair_bg_color": null,530 "flair_group_id": null,531 "trust_level": 1532 },533 {534 "id": 3534,535 "username": "ptrblck",536 "name": "",537 "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",538 "post_count": 1,539 "primary_group_name": null,540 "flair_name": null,541 "flair_url": null,542 "flair_color": null,543 "flair_bg_color": null,544 "flair_group_id": null,545 "admin": true,546 "moderator": true,547 "trust_level": 2548 }549 ],550 "created_by": {551 "id": 46499,552 "username": "Tom_F",553 "name": null,554 "avatar_template": "/letter_avatar_proxy/v4/letter/t/edb3f5/{size}.png"555 },556 "last_poster": {557 "id": 46499,558 "username": "Tom_F",559 "name": null,560 "avatar_template": "/letter_avatar_proxy/v4/letter/t/edb3f5/{size}.png"561 },562 "links": [563 {564 "url": "https://pytorch.org/tutorials/beginner/finetuning_torchvision_models_tutorial.html",565 "title": "Finetuning Torchvision Models — PyTorch Tutorials 1.2.0 documentation",566 "internal": false,567 "attachment": false,568 "reflection": false,569 "clicks": 69,570 "user_id": 46499,571 "domain": "pytorch.org",572 "root_domain": "pytorch.org"573 }574 ]575 },576 "bookmarks": []577 },578 {579 "post_stream": {580 "posts": [581 {582 "id": 301985,583 "name": "",584 "username": "StephDoc",585 "avatar_template": "/user_avatar/discuss.pytorch.org/stephdoc/{size}/31081_2.png",586 "created_at": "2021-08-19T12:16:24.393Z",587 "cooked": "<p>Dear all,</p>\n<p>I have the following tensor:<br>\ny = (torch.rand(size=(1,81)) < 0.25).long()</p>\n<p>how can I change the size to # Out[288]: torch.Size([81])<br>\n?</p>",588 "post_number": 1,589 "post_type": 1,590 "posts_count": 3,591 "updated_at": "2021-08-19T12:16:24.393Z",592 "reply_count": 0,593 "reply_to_post_number": null,594 "quote_count": 0,595 "incoming_link_count": 14,596 "reads": 6,597 "readers_count": 5,598 "score": 71.2,599 "yours": false,600 "topic_id": 129755,601 "topic_slug": "how-to-change-the-size-of-tensor",602 "display_username": "",603 "primary_group_name": null,604 "flair_name": null,605 "flair_url": null,606 "flair_bg_color": null,607 "flair_color": null,608 "flair_group_id": null,609 "badges_granted": [],610 "version": 1,611 "can_edit": false,612 "can_delete": false,613 "can_recover": false,614 "can_see_hidden_post": false,615 "can_wiki": false,616 "read": true,617 "user_title": null,618 "bookmarked": false,619 "actions_summary": [],620 "moderator": false,621 "admin": false,622 "staff": false,623 "user_id": 48047,624 "hidden": false,625 "trust_level": 1,626 "deleted_at": null,627 "user_deleted": false,628 "edit_reason": null,629 "can_view_edit_history": true,630 "wiki": false,631 "post_url": "/t/how-to-change-the-size-of-tensor/129755/1",632 "can_accept_answer": false,633 "can_unaccept_answer": false,634 "accepted_answer": false,635 "topic_accepted_answer": null,636 "can_vote": false637 },638 {639 "id": 302097,640 "name": "",641 "username": "ptrblck",642 "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",643 "created_at": "2021-08-20T00:54:54.464Z",644 "cooked": "<p><code>y</code> will have the shape <code>torch.Size([1, 81])</code>. To remove <code>dim0</code> you could use:</p>\n<pre><code class=\"lang-python\">y = (torch.rand(size=(1,81)) < 0.25).long().squeeze(0)\n</code></pre>",645 "post_number": 2,646 "post_type": 1,647 "posts_count": 3,648 "updated_at": "2021-08-20T00:54:54.464Z",649 "reply_count": 1,650 "reply_to_post_number": null,651 "quote_count": 0,652 "incoming_link_count": 2,653 "reads": 6,654 "readers_count": 5,655 "score": 16.2,656 "yours": false,657 "topic_id": 129755,658 "topic_slug": "how-to-change-the-size-of-tensor",659 "display_username": "",660 "primary_group_name": null,661 "flair_name": null,662 "flair_url": null,663 "flair_bg_color": null,664 "flair_color": null,665 "flair_group_id": null,666 "badges_granted": [],667 "version": 1,668 "can_edit": false,669 "can_delete": false,670 "can_recover": false,671 "can_see_hidden_post": false,672 "can_wiki": false,673 "read": true,674 "user_title": "",675 "bookmarked": false,676 "actions_summary": [],677 "moderator": true,678 "admin": true,679 "staff": true,680 "user_id": 3534,681 "hidden": false,682 "trust_level": 2,683 "deleted_at": null,684 "user_deleted": false,685 "edit_reason": null,686 "can_view_edit_history": true,687 "wiki": false,688 "post_url": "/t/how-to-change-the-size-of-tensor/129755/2",689 "can_accept_answer": false,690 "can_unaccept_answer": false,691 "accepted_answer": false,692 "topic_accepted_answer": null693 },694 {695 "id": 302499,696 "name": "",697 "username": "StephDoc",698 "avatar_template": "/user_avatar/discuss.pytorch.org/stephdoc/{size}/31081_2.png",699 "created_at": "2021-08-22T16:38:13.997Z",700 "cooked": "<p>Great! Thanks a lot!</p>",701 "post_number": 3,702 "post_type": 1,703 "posts_count": 3,704 "updated_at": "2021-08-22T16:38:13.997Z",705 "reply_count": 0,706 "reply_to_post_number": 2,707 "quote_count": 0,708 "incoming_link_count": 1,709 "reads": 5,710 "readers_count": 4,711 "score": 6.0,712 "yours": false,713 "topic_id": 129755,714 "topic_slug": "how-to-change-the-size-of-tensor",715 "display_username": "",716 "primary_group_name": null,717 "flair_name": null,718 "flair_url": null,719 "flair_bg_color": null,720 "flair_color": null,721 "flair_group_id": null,722 "badges_granted": [],723 "version": 1,724 "can_edit": false,725 "can_delete": false,726 "can_recover": false,727 "can_see_hidden_post": false,728 "can_wiki": false,729 "read": true,730 "user_title": null,731 "reply_to_user": {732 "id": 3534,733 "username": "ptrblck",734 "name": "",735 "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png"736 },737 "bookmarked": false,738 "actions_summary": [],739 "moderator": false,740 "admin": false,741 "staff": false,742 "user_id": 48047,743 "hidden": false,744 "trust_level": 1,745 "deleted_at": null,746 "user_deleted": false,747 "edit_reason": null,748 "can_view_edit_history": true,749 "wiki": false,750 "post_url": "/t/how-to-change-the-size-of-tensor/129755/3",751 "can_accept_answer": false,752 "can_unaccept_answer": false,753 "accepted_answer": false,754 "topic_accepted_answer": null755 }756 ],757 "stream": [758 301985,759 302097,760 302499761 ]762 },763 "timeline_lookup": [764 [765 1,766 1528767 ],768 [769 3,770 1525771 ]772 ],773 "suggested_topics": [774 {775 "fancy_title": "When training with FSDP, optimizer_0 and pytorch_model_fsdp_0 directories are created. How do I extract model.bin and config.json files from them?",776 "id": 212236,777 "title": "When training with FSDP, optimizer_0 and pytorch_model_fsdp_0 directories are created. How do I extract model.bin and config.json files from them?",778 "slug": "when-training-with-fsdp-optimizer-0-and-pytorch-model-fsdp-0-directories-are-created-how-do-i-extract-model-bin-and-config-json-files-from-them",779 "posts_count": 1,780 "reply_count": 0,781 "highest_post_number": 1,782 "image_url": null,783 "created_at": "2024-10-29T04:14:49.991Z",784 "last_posted_at": "2024-10-29T04:14:50.040Z",785 "bumped": true,786 "bumped_at": "2024-10-29T04:14:50.040Z",787 "archetype": "regular",788 "unseen": false,789 "pinned": false,790 "unpinned": null,791 "visible": true,792 "closed": false,793 "archived": false,794 "bookmarked": null,795 "liked": null,796 "tags_descriptions": {},797 "like_count": 0,798 "views": 37,799 "category_id": 1,800 "featured_link": null,801 "has_accepted_answer": false,802 "posters": [803 {804 "extras": "latest single",805 "description": "Original Poster, Most Recent Poster",806 "user": {807 "id": 80551,808 "username": "ysg5025",809 "name": "대곤 유",810 "avatar_template": "/user_avatar/discuss.pytorch.org/ysg5025/{size}/73642_2.png",811 "trust_level": 0812 }813 }814 ]815 },816 {817 "fancy_title": "Distributed training with Trainer and ConstantLengthDataset classes",818 "id": 214609,819 "title": "Distributed training with Trainer and ConstantLengthDataset classes",820 "slug": "distributed-training-with-trainer-and-constantlengthdataset-classes",821 "posts_count": 1,822 "reply_count": 0,823 "highest_post_number": 1,824 "image_url": null,825 "created_at": "2024-12-24T22:10:56.834Z",826 "last_posted_at": "2024-12-24T22:10:56.875Z",827 "bumped": true,828 "bumped_at": "2024-12-24T22:10:56.875Z",829 "archetype": "regular",830 "unseen": false,831 "pinned": false,832 "unpinned": null,833 "visible": true,834 "closed": false,835 "archived": false,836 "bookmarked": null,837 "liked": null,838 "tags_descriptions": {},839 "like_count": 0,840 "views": 51,841 "category_id": 1,842 "featured_link": null,843 "has_accepted_answer": false,844 "posters": [845 {846 "extras": "latest single",847 "description": "Original Poster, Most Recent Poster",848 "user": {849 "id": 81079,850 "username": "ima882112",851 "name": "Joe",852 "avatar_template": "/user_avatar/discuss.pytorch.org/ima882112/{size}/74143_2.png",853 "trust_level": 1854 }855 }856 ]857 },858 {859 "fancy_title": "Why kernels different streams can’t in parallel",860 "id": 215618,861 "title": "Why kernels different streams can't in parallel",862 "slug": "why-kernels-different-streams-cant-in-parallel",863 "posts_count": 2,864 "reply_count": 0,865 "highest_post_number": 2,866 "image_url": "https://discuss.pytorch.org/uploads/default/optimized/3X/f/f/ff20ec5488f7548c57f81427e2ca0e83062f5ee9_2_1024x801.png",867 "created_at": "2025-01-20T07:24:07.095Z",868 "last_posted_at": "2025-01-20T13:51:41.366Z",869 "bumped": true,870 "bumped_at": "2025-01-20T13:51:41.366Z",871 "archetype": "regular",872 "unseen": false,873 "pinned": false,874 "unpinned": null,875 "visible": true,876 "closed": false,877 "archived": false,878 "bookmarked": null,879 "liked": null,880 "tags_descriptions": {},881 "like_count": 0,882 "views": 206,883 "category_id": 1,884 "featured_link": null,885 "has_accepted_answer": false,886 "posters": [887 {888 "extras": null,889 "description": "Original Poster",890 "user": {891 "id": 72471,892 "username": "shadowshadow",893 "name": "",894 "avatar_template": "/user_avatar/discuss.pytorch.org/shadowshadow/{size}/62985_2.png",895 "trust_level": 2896 }897 },898 {899 "extras": "latest",900 "description": "Most Recent Poster",901 "user": {902 "id": 3534,903 "username": "ptrblck",904 "name": "",905 "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",906 "admin": true,907 "moderator": true,908 "trust_level": 2909 }910 }911 ]912 },913 {914 "fancy_title": "Persistent error in loss.backward() during joint-training of two models using two different but dependent loss functions",915 "id": 212593,916 "title": "Persistent error in loss.backward() during joint-training of two models using two different but dependent loss functions",917 "slug": "persistent-error-in-loss-backward-during-joint-training-of-two-models-using-two-different-but-dependent-loss-functions",918 "posts_count": 1,919 "reply_count": 0,920 "highest_post_number": 1,921 "image_url": "https://discuss.pytorch.org/uploads/default/optimized/3X/3/d/3db4085e6be45f34ad9d0a6ff92d9f7a375fa71d_2_1024x664.png",922 "created_at": "2024-11-06T05:47:29.578Z",923 "last_posted_at": "2024-11-06T05:47:29.688Z",924 "bumped": true,925 "bumped_at": "2024-11-06T05:47:29.688Z",926 "archetype": "regular",927 "unseen": false,928 "pinned": false,929 "unpinned": null,930 "visible": true,931 "closed": false,932 "archived": false,933 "bookmarked": null,934 "liked": null,935 "tags_descriptions": {},936 "like_count": 0,937 "views": 10,938 "category_id": 1,939 "featured_link": null,940 "has_accepted_answer": false,941 "posters": [942 {943 "extras": "latest single",944 "description": "Original Poster, Most Recent Poster",945 "user": {946 "id": 80719,947 "username": "Goutam",948 "name": "Goutam",949 "avatar_template": "/user_avatar/discuss.pytorch.org/goutam/{size}/73797_2.png",950 "trust_level": 0951 }952 }953 ]954 },955 {956 "fancy_title": "Can I ask for feedback on a custom-built PyTorch (CUDA 12.8 / RTX 5070 Ti)?",957 "id": 218174,958 "title": "Can I ask for feedback on a custom-built PyTorch (CUDA 12.8 / RTX 5070 Ti)?",959 "slug": "can-i-ask-for-feedback-on-a-custom-built-pytorch-cuda-12-8-rtx-5070-ti",960 "posts_count": 3,961 "reply_count": 1,962 "highest_post_number": 3,963 "image_url": null,964 "created_at": "2025-03-23T16:37:54.914Z",965 "last_posted_at": "2025-03-23T17:21:47.469Z",966 "bumped": true,967 "bumped_at": "2025-03-23T17:21:47.469Z",968 "archetype": "regular",969 "unseen": false,970 "pinned": false,971 "unpinned": null,972 "visible": true,973 "closed": false,974 "archived": false,975 "bookmarked": null,976 "liked": null,977 "tags_descriptions": {},978 "like_count": 0,979 "views": 385,980 "category_id": 1,981 "featured_link": null,982 "has_accepted_answer": false,983 "posters": [984 {985 "extras": "latest",986 "description": "Original Poster, Most Recent Poster",987 "user": {988 "id": 83428,989 "username": "gradiuse",990 "name": "hcc1shot",991 "avatar_template": "/user_avatar/discuss.pytorch.org/gradiuse/{size}/76303_2.png",992 "trust_level": 0993 }994 },995 {996 "extras": null,997 "description": "Frequent Poster",998 "user": {999 "id": 3534,1000 "username": "ptrblck",1001 "name": "",1002 "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",1003 "admin": true,1004 "moderator": true,1005 "trust_level": 21006 }1007 }1008 ]1009 }1010 ],1011 "tags_descriptions": {},1012 "fancy_title": "How to change the size of tensor",1013 "id": 129755,1014 "title": "How to change the size of tensor",1015 "posts_count": 3,1016 "created_at": "2021-08-19T12:16:24.324Z",1017 "views": 267,1018 "reply_count": 1,1019 "like_count": 0,1020 "last_posted_at": "2021-08-22T16:38:13.997Z",1021 "visible": true,1022 "closed": false,1023 "archived": false,1024 "has_summary": false,1025 "archetype": "regular",1026 "slug": "how-to-change-the-size-of-tensor",1027 "category_id": 1,1028 "word_count": 59,1029 "deleted_at": null,1030 "user_id": 48047,1031 "featured_link": null,1032 "pinned_globally": false,1033 "pinned_at": null,1034 "pinned_until": null,1035 "image_url": null,1036 "slow_mode_seconds": 0,1037 "draft": null,1038 "draft_key": "topic_129755",1039 "draft_sequence": null,1040 "unpinned": null,1041 "pinned": false,1042 "current_post_number": 1,1043 "highest_post_number": 3,1044 "deleted_by": null,1045 "actions_summary": [1046 {1047 "id": 4,1048 "count": 0,1049 "hidden": false,1050 "can_act": false1051 },1052 {1053 "id": 8,1054 "count": 0,1055 "hidden": false,1056 "can_act": false1057 },1058 {1059 "id": 10,1060 "count": 0,1061 "hidden": false,1062 "can_act": false1063 },1064 {1065 "id": 7,1066 "count": 0,1067 "hidden": false,1068 "can_act": false1069 }1070 ],1071 "chunk_size": 20,1072 "bookmarked": false,1073 "topic_timer": null,1074 "message_bus_last_id": 0,1075 "participant_count": 2,1076 "show_read_indicator": false,1077 "thumbnails": null,1078 "slow_mode_enabled_until": null,1079 "can_vote": false,1080 "vote_count": 0,1081 "user_voted": false,1082 "discourse_zendesk_plugin_zendesk_id": null,1083 "discourse_zendesk_plugin_zendesk_url": "https://your-url.zendesk.com/agent/tickets/",1084 "details": {1085 "can_edit": false,1086 "notification_level": 1,1087 "participants": [1088 {1089 "id": 48047,1090 "username": "StephDoc",1091 "name": "",1092 "avatar_template": "/user_avatar/discuss.pytorch.org/stephdoc/{size}/31081_2.png",1093 "post_count": 2,1094 "primary_group_name": null,1095 "flair_name": null,1096 "flair_url": null,1097 "flair_color": null,1098 "flair_bg_color": null,1099 "flair_group_id": null,1100 "trust_level": 11101 },1102 {1103 "id": 3534,1104 "username": "ptrblck",1105 "name": "",1106 "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",1107 "post_count": 1,1108 "primary_group_name": null,1109 "flair_name": null,1110 "flair_url": null,1111 "flair_color": null,1112 "flair_bg_color": null,1113 "flair_group_id": null,1114 "admin": true,1115 "moderator": true,1116 "trust_level": 21117 }1118 ],1119 "created_by": {1120 "id": 48047,1121 "username": "StephDoc",1122 "name": "",1123 "avatar_template": "/user_avatar/discuss.pytorch.org/stephdoc/{size}/31081_2.png"1124 },1125 "last_poster": {1126 "id": 48047,1127 "username": "StephDoc",1128 "name": "",1129 "avatar_template": "/user_avatar/discuss.pytorch.org/stephdoc/{size}/31081_2.png"1130 }1131 },1132 "bookmarks": []1133 },1134 {1135 "post_stream": {1136 "posts": [1137 {1138 "id": 298368,1139 "name": "Sevag",1140 "username": "sevagh",1141 "avatar_template": "/user_avatar/discuss.pytorch.org/sevagh/{size}/38370_2.png",1142 "created_at": "2021-07-28T23:22:55.152Z",1143 "cooked": "<p>Hello,</p>\n<p>I’m trying to speed up my model inference. It’s a PyTorch module, pretty standard - no special ops, just PyTorch convolution layers.</p>\n<p>The export code is copied from this tutorial <a href=\"https://pytorch.org/tutorials/advanced/super_resolution_with_onnxruntime.html\" class=\"inline-onebox\" rel=\"noopener nofollow ugc\">(optional) Exporting a Model from PyTorch to ONNX and Running it using ONNX Runtime — PyTorch Tutorials 1.9.0+cu102 documentation</a> :</p>\n<pre><code class=\"lang-auto\">if __name__ == '__main__':\n model_str_or_path = sys.argv[1]\n model_path = Path(model_str_or_path).expanduser()\n\n # when path exists, we assume its a custom model saved locally\n if model_path.exists():\n with open(Path(model_path, \"separator.json\"), \"r\") as stream:\n enc_conf = json.load(stream)\n\n xumx_model, model_nsgt, jagged_slicq_sample = load_target_models(\n model_str_or_path=model_path, pretrained=True, sample_rate=enc_conf[\"sample_rate\"], device=\"cpu\"\n )\n\n xumx_model.eval()\n\n # Input to the model\n torch_out = xumx_model(jagged_slicq_sample)\n\n # Export the model\n torch.onnx.export(xumx_model, # model being run\n jagged_slicq_sample, # model input (or a tuple for multiple inputs)\n \"xumx_slicq.onnx\", # where to save the model (can be a file or file-like object)\n export_params=True, # store the trained parameter weights inside the model file\n opset_version=11, # the ONNX version to export the model to\n do_constant_folding=True, # whether to execute constant folding for optimization\n input_names = ['input'], # the model's input names\n output_names = ['output'], # the model's output names\n dynamic_axes={'input' : {0 : 'batch_size'}, # variable length axes\n 'output' : {0 : 'batch_size'}})\n</code></pre>\n<p>My model has ~6.7 million parameters (torchinfo output):</p>\n<pre><code class=\"lang-auto\">===============================================================================================\nLayer (type:depth-idx) Output Shape Param #\n===============================================================================================\nOpenUnmix -- --\nTotal params: 6,669,912\nTrainable params: 6,669,912\nNon-trainable params: 0\nTotal mult-adds (G): 194.27\n===============================================================================================\nInput size (MB): 28.63\nForward/backward pass size (MB): 9359.33\nParams size (MB): 26.68\nEstimated Total Size (MB): 9414.64\n</code></pre>\n<p>The trained size for the pth weights file is 28M.</p>\n<p>My export command has been running for 3 hours, and has not completed yet. I’m wondering if that’s an expected export time for my size of model.</p>\n<p>Thanks.</p>",1144 "post_number": 1,1145 "post_type": 1,1146 "posts_count": 5,1147 "updated_at": "2021-07-28T23:22:55.152Z",1148 "reply_count": 0,1149 "reply_to_post_number": null,1150 "quote_count": 0,1151 "incoming_link_count": 3044,1152 "reads": 42,1153 "readers_count": 41,1154 "score": 15203.4,1155 "yours": false,1156 "topic_id": 127979,1157 "topic_slug": "torch-onnx-export-of-pytorch-model-is-slow-expected-completion-time",1158 "display_username": "Sevag",1159 "primary_group_name": null,1160 "flair_name": null,1161 "flair_url": null,1162 "flair_bg_color": null,1163 "flair_color": null,1164 "flair_group_id": null,1165 "badges_granted": [],1166 "version": 1,1167 "can_edit": false,1168 "can_delete": false,1169 "can_recover": false,1170 "can_see_hidden_post": false,1171 "can_wiki": false,1172 "link_counts": [1173 {1174 "url": "https://pytorch.org/tutorials/advanced/super_resolution_with_onnxruntime.html",1175 "internal": false,1176 "reflection": false,1177 "title": "(optional) Exporting a Model from PyTorch to ONNX and Running it using ONNX Runtime — PyTorch Tutorials 1.9.0+cu102 documentation",1178 "clicks": 141179 }1180 ],1181 "read": true,1182 "user_title": "",1183 "bookmarked": false,1184 "actions_summary": [],1185 "moderator": false,1186 "admin": false,1187 "staff": false,1188 "user_id": 45442,1189 "hidden": false,1190 "trust_level": 1,1191 "deleted_at": null,1192 "user_deleted": false,1193 "edit_reason": null,1194 "can_view_edit_history": true,1195 "wiki": false,1196 "post_url": "/t/torch-onnx-export-of-pytorch-model-is-slow-expected-completion-time/127979/1",1197 "can_accept_answer": false,1198 "can_unaccept_answer": false,1199 "accepted_answer": false,1200 "topic_accepted_answer": true,