Anurag1734/cuda-error-resolution-analysis
07
1[2 {3 "post_stream": {4 "posts": [5 {6 "id": 274192,7 "name": "Raidon55555",8 "username": "Raidon5555",9 "avatar_template": "/user_avatar/discuss.pytorch.org/raidon5555/{size}/33218_2.png",10 "created_at": "2021-03-31T18:27:19.380Z",11 "cooked": "<p>Hello can anyone help me? I am starting PyTorch and i dont know to explain this code:</p>\n<p>the batch-size is 32</p>\n<p>self.conv1 = nn.Conv2d(3, 64, kernel_size=3, stride=1)<br>\nself.relu1 = nn.ReLU()<br>\nself.conv2 = nn.Conv2d(64, 64, kernel_size=3, stride=1)</p>\n<p>How many neurons has the input layer, hidden layer and the output layer? And what is the size of the hidden layer?</p>\n<p>Everyone answer is welcome</p>",12 "post_number": 1,13 "post_type": 1,14 "posts_count": 3,15 "updated_at": "2021-03-31T18:27:19.380Z",16 "reply_count": 0,17 "reply_to_post_number": null,18 "quote_count": 0,19 "incoming_link_count": 13,20 "reads": 10,21 "readers_count": 9,22 "score": 67.0,23 "yours": false,24 "topic_id": 116632,25 "topic_slug": "cricket-need-help-to-understand",26 "display_username": "Raidon55555",27 "primary_group_name": null,28 "flair_name": null,29 "flair_url": null,30 "flair_bg_color": null,31 "flair_color": null,32 "flair_group_id": null,33 "badges_granted": [],34 "version": 1,35 "can_edit": false,36 "can_delete": false,37 "can_recover": false,38 "can_see_hidden_post": false,39 "can_wiki": false,40 "read": true,41 "user_title": null,42 "bookmarked": false,43 "actions_summary": [],44 "moderator": false,45 "admin": false,46 "staff": false,47 "user_id": 43758,48 "hidden": false,49 "trust_level": 0,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/cricket-need-help-to-understand/116632/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": 275533,64 "name": "Raidon55555",65 "username": "Raidon5555",66 "avatar_template": "/user_avatar/discuss.pytorch.org/raidon5555/{size}/33218_2.png",67 "created_at": "2021-04-06T17:47:44.890Z",68 "cooked": "<p>Can anyone help me pls?</p>",69 "post_number": 2,70 "post_type": 1,71 "posts_count": 3,72 "updated_at": "2021-04-06T17:47:44.890Z",73 "reply_count": 0,74 "reply_to_post_number": null,75 "quote_count": 0,76 "incoming_link_count": 0,77 "reads": 6,78 "readers_count": 5,79 "score": 1.2,80 "yours": false,81 "topic_id": 116632,82 "topic_slug": "cricket-need-help-to-understand",83 "display_username": "Raidon55555",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": null,99 "bookmarked": false,100 "actions_summary": [],101 "moderator": false,102 "admin": false,103 "staff": false,104 "user_id": 43758,105 "hidden": false,106 "trust_level": 0,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/cricket-need-help-to-understand/116632/2",113 "can_accept_answer": false,114 "can_unaccept_answer": false,115 "accepted_answer": false,116 "topic_accepted_answer": null117 },118 {119 "id": 275534,120 "name": "Sanjan Das",121 "username": "Sanjan_Das",122 "avatar_template": "/user_avatar/discuss.pytorch.org/sanjan_das/{size}/36341_2.png",123 "created_at": "2021-04-06T18:17:26.038Z",124 "cooked": "<p>Perhaps you may get a much better answer (and understanding) by looking at some videos on CNN basics (one here: <a href=\"https://www.youtube.com/watch?v=m8pOnJxOcqY\" class=\"inline-onebox\" rel=\"noopener nofollow ugc\">Convolution Ne</a>).</p>\n<p>The model you’ve mentioned here seems incomplete for any deep learning task. Note that your input and output layer is largely defined by what you want to achieve. It may be more efficient if you have a go at tutorials and beginner resources on CNNs available online first! (there are plenty out there)</p>",125 "post_number": 3,126 "post_type": 1,127 "posts_count": 3,128 "updated_at": "2021-04-06T18:17:26.038Z",129 "reply_count": 0,130 "reply_to_post_number": null,131 "quote_count": 0,132 "incoming_link_count": 0,133 "reads": 5,134 "readers_count": 4,135 "score": 1.0,136 "yours": false,137 "topic_id": 116632,138 "topic_slug": "cricket-need-help-to-understand",139 "display_username": "Sanjan Das",140 "primary_group_name": null,141 "flair_name": null,142 "flair_url": null,143 "flair_bg_color": null,144 "flair_color": null,145 "flair_group_id": null,146 "badges_granted": [],147 "version": 1,148 "can_edit": false,149 "can_delete": false,150 "can_recover": false,151 "can_see_hidden_post": false,152 "can_wiki": false,153 "link_counts": [154 {155 "url": "https://www.youtube.com/watch?v=m8pOnJxOcqY",156 "internal": false,157 "reflection": false,158 "title": "Convolution Neural Networks - EXPLAINED - YouTube",159 "clicks": 1160 }161 ],162 "read": true,163 "user_title": null,164 "bookmarked": false,165 "actions_summary": [],166 "moderator": false,167 "admin": false,168 "staff": false,169 "user_id": 43577,170 "hidden": false,171 "trust_level": 2,172 "deleted_at": null,173 "user_deleted": false,174 "edit_reason": null,175 "can_view_edit_history": true,176 "wiki": false,177 "post_url": "/t/cricket-need-help-to-understand/116632/3",178 "can_accept_answer": false,179 "can_unaccept_answer": false,180 "accepted_answer": false,181 "topic_accepted_answer": null182 }183 ],184 "stream": [185 274192,186 275533,187 275534188 ]189 },190 "timeline_lookup": [191 [192 1,193 1669194 ],195 [196 2,197 1663198 ]199 ],200 "suggested_topics": [201 {202 "fancy_title": "Problem: RuntimeError: operator torchvision::nms does not exist",203 "id": 219101,204 "title": "Problem: RuntimeError: operator torchvision::nms does not exist",205 "slug": "problem-runtimeerror-operator-torchvision-nms-does-not-exist",206 "posts_count": 3,207 "reply_count": 1,208 "highest_post_number": 3,209 "image_url": null,210 "created_at": "2025-04-15T10:10:17.158Z",211 "last_posted_at": "2025-04-17T06:54:24.349Z",212 "bumped": true,213 "bumped_at": "2025-04-17T06:54:24.349Z",214 "archetype": "regular",215 "unseen": false,216 "pinned": false,217 "unpinned": null,218 "visible": true,219 "closed": false,220 "archived": false,221 "bookmarked": null,222 "liked": null,223 "tags_descriptions": {},224 "like_count": 0,225 "views": 363,226 "category_id": 5,227 "featured_link": null,228 "has_accepted_answer": false,229 "posters": [230 {231 "extras": "latest single",232 "description": "Original Poster, Most Recent Poster",233 "user": {234 "id": 83827,235 "username": "yiy89375",236 "name": "亿 杨",237 "avatar_template": "/user_avatar/discuss.pytorch.org/yiy89375/{size}/76635_2.png",238 "trust_level": 0239 }240 }241 ]242 },243 {244 "fancy_title": "Extracting Swin-Vit backbone",245 "id": 212799,246 "title": "Extracting Swin-Vit backbone",247 "slug": "extracting-swin-vit-backbone",248 "posts_count": 1,249 "reply_count": 0,250 "highest_post_number": 1,251 "image_url": null,252 "created_at": "2024-11-11T09:54:48.491Z",253 "last_posted_at": "2024-11-11T09:54:48.540Z",254 "bumped": true,255 "bumped_at": "2024-11-11T09:54:48.540Z",256 "archetype": "regular",257 "unseen": false,258 "pinned": false,259 "unpinned": null,260 "visible": true,261 "closed": false,262 "archived": false,263 "bookmarked": null,264 "liked": null,265 "tags_descriptions": {},266 "like_count": 0,267 "views": 196,268 "category_id": 5,269 "featured_link": null,270 "has_accepted_answer": false,271 "posters": [272 {273 "extras": "latest single",274 "description": "Original Poster, Most Recent Poster",275 "user": {276 "id": 56688,277 "username": "ima",278 "name": "Imantha gunasekera",279 "avatar_template": "/letter_avatar_proxy/v4/letter/i/67e7ee/{size}.png",280 "trust_level": 1281 }282 }283 ]284 },285 {286 "fancy_title": "Integrating kFold cross validation",287 "id": 218039,288 "title": "Integrating kFold cross validation",289 "slug": "integrating-kfold-cross-validation",290 "posts_count": 1,291 "reply_count": 0,292 "highest_post_number": 1,293 "image_url": null,294 "created_at": "2025-03-19T21:31:30.408Z",295 "last_posted_at": "2025-03-19T21:31:30.450Z",296 "bumped": true,297 "bumped_at": "2025-03-19T21:31:30.450Z",298 "archetype": "regular",299 "unseen": false,300 "pinned": false,301 "unpinned": null,302 "visible": true,303 "closed": false,304 "archived": false,305 "bookmarked": null,306 "liked": null,307 "tags_descriptions": {},308 "like_count": 0,309 "views": 31,310 "category_id": 5,311 "featured_link": null,312 "has_accepted_answer": false,313 "posters": [314 {315 "extras": "latest single",316 "description": "Original Poster, Most Recent Poster",317 "user": {318 "id": 68222,319 "username": "amy2",320 "name": "amy",321 "avatar_template": "/user_avatar/discuss.pytorch.org/amy2/{size}/62675_2.png",322 "trust_level": 1323 }324 }325 ]326 },327 {328 "fancy_title": "CrossEntropy Issue",329 "id": 214703,330 "title": "CrossEntropy Issue",331 "slug": "crossentropy-issue",332 "posts_count": 2,333 "reply_count": 0,334 "highest_post_number": 2,335 "image_url": null,336 "created_at": "2024-12-27T14:04:44.755Z",337 "last_posted_at": "2024-12-27T18:27:54.377Z",338 "bumped": true,339 "bumped_at": "2024-12-27T18:27:54.377Z",340 "archetype": "regular",341 "unseen": false,342 "pinned": false,343 "unpinned": null,344 "visible": true,345 "closed": false,346 "archived": false,347 "bookmarked": null,348 "liked": null,349 "tags_descriptions": {},350 "like_count": 0,351 "views": 149,352 "category_id": 5,353 "featured_link": null,354 "has_accepted_answer": false,355 "posters": [356 {357 "extras": null,358 "description": "Original Poster",359 "user": {360 "id": 81646,361 "username": "bruhnugget-nice",362 "name": "bruhnugget",363 "avatar_template": "/user_avatar/discuss.pytorch.org/bruhnugget-nice/{size}/74667_2.png",364 "trust_level": 1365 }366 },367 {368 "extras": "latest",369 "description": "Most Recent Poster",370 "user": {371 "id": 3534,372 "username": "ptrblck",373 "name": "",374 "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",375 "admin": true,376 "moderator": true,377 "trust_level": 2378 }379 }380 ]381 },382 {383 "fancy_title": "Problem using nn.Sequential",384 "id": 219516,385 "title": "Problem using nn.Sequential",386 "slug": "problem-using-nn-sequential",387 "posts_count": 2,388 "reply_count": 0,389 "highest_post_number": 2,390 "image_url": null,391 "created_at": "2025-04-27T16:40:11.315Z",392 "last_posted_at": "2025-04-27T19:43:47.206Z",393 "bumped": true,394 "bumped_at": "2025-04-27T19:43:47.206Z",395 "archetype": "regular",396 "unseen": false,397 "pinned": false,398 "unpinned": null,399 "visible": true,400 "closed": false,401 "archived": false,402 "bookmarked": null,403 "liked": null,404 "tags_descriptions": {},405 "like_count": 2,406 "views": 105,407 "category_id": 5,408 "featured_link": null,409 "has_accepted_answer": false,410 "posters": [411 {412 "extras": null,413 "description": "Original Poster",414 "user": {415 "id": 84039,416 "username": "eagle.py",417 "name": "Ektoras",418 "avatar_template": "/letter_avatar_proxy/v4/letter/e/7c8e57/{size}.png",419 "trust_level": 1420 }421 },422 {423 "extras": "latest",424 "description": "Most Recent Poster",425 "user": {426 "id": 18088,427 "username": "KFrank",428 "name": "K. Frank",429 "avatar_template": "/letter_avatar_proxy/v4/letter/k/ecb155/{size}.png",430 "trust_level": 2431 }432 }433 ]434 }435 ],436 "tags_descriptions": {},437 "fancy_title": "Cricket need help to understand",438 "id": 116632,439 "title": "Cricket need help to understand",440 "posts_count": 3,441 "created_at": "2021-03-31T18:27:19.309Z",442 "views": 324,443 "reply_count": 0,444 "like_count": 0,445 "last_posted_at": "2021-04-06T18:17:26.038Z",446 "visible": true,447 "closed": false,448 "archived": false,449 "has_summary": false,450 "archetype": "regular",451 "slug": "cricket-need-help-to-understand",452 "category_id": 5,453 "word_count": 158,454 "deleted_at": null,455 "user_id": 43758,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_116632",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 "can_vote": false,505 "vote_count": 0,506 "user_voted": false,507 "discourse_zendesk_plugin_zendesk_id": null,508 "discourse_zendesk_plugin_zendesk_url": "https://your-url.zendesk.com/agent/tickets/",509 "details": {510 "can_edit": false,511 "notification_level": 1,512 "participants": [513 {514 "id": 43758,515 "username": "Raidon5555",516 "name": "Raidon55555",517 "avatar_template": "/user_avatar/discuss.pytorch.org/raidon5555/{size}/33218_2.png",518 "post_count": 2,519 "primary_group_name": null,520 "flair_name": null,521 "flair_url": null,522 "flair_color": null,523 "flair_bg_color": null,524 "flair_group_id": null,525 "trust_level": 0526 },527 {528 "id": 43577,529 "username": "Sanjan_Das",530 "name": "Sanjan Das",531 "avatar_template": "/user_avatar/discuss.pytorch.org/sanjan_das/{size}/36341_2.png",532 "post_count": 1,533 "primary_group_name": null,534 "flair_name": null,535 "flair_url": null,536 "flair_color": null,537 "flair_bg_color": null,538 "flair_group_id": null,539 "trust_level": 2540 }541 ],542 "created_by": {543 "id": 43758,544 "username": "Raidon5555",545 "name": "Raidon55555",546 "avatar_template": "/user_avatar/discuss.pytorch.org/raidon5555/{size}/33218_2.png"547 },548 "last_poster": {549 "id": 43577,550 "username": "Sanjan_Das",551 "name": "Sanjan Das",552 "avatar_template": "/user_avatar/discuss.pytorch.org/sanjan_das/{size}/36341_2.png"553 },554 "links": [555 {556 "url": "https://www.youtube.com/watch?v=m8pOnJxOcqY",557 "title": "Convolution Neural Networks - EXPLAINED - YouTube",558 "internal": false,559 "attachment": false,560 "reflection": false,561 "clicks": 1,562 "user_id": 43577,563 "domain": "www.youtube.com",564 "root_domain": "youtube.com"565 }566 ]567 },568 "bookmarks": []569 },570 {571 "post_stream": {572 "posts": [573 {574 "id": 275499,575 "name": "Sa",576 "username": "sam101",577 "avatar_template": "/user_avatar/discuss.pytorch.org/sam101/{size}/14962_2.png",578 "created_at": "2021-04-06T14:03:47.739Z",579 "cooked": "<p>latent_size = 20</p>\n<p>encoder = ConditionalNormal(MLP(3000, latent_size,<br>\nhidden_units=[512,256],<br>\nactivation=‘relu’,<br>\nin_lambda=lambda x: x.view(x.shape[0], 3000).float() - 1))<br>\ndecoder = ConditionalNormal(MLP(latent_size, 3000,<br>\nhidden_units=[512,256],<br>\nactivation=‘relu’,<br>\nout_lambda=lambda x: x.view(x.shape[0], 3000).float() - 1))</p>\n<p>model = Flow(base_dist=StandardNormal((latent_size,)),<br>\ntransforms=[<br>\nVAE(encoder=encoder, decoder=decoder)<br>\n]).to(device)</p>",580 "post_number": 1,581 "post_type": 1,582 "posts_count": 3,583 "updated_at": "2021-04-06T14:03:47.739Z",584 "reply_count": 0,585 "reply_to_post_number": null,586 "quote_count": 0,587 "incoming_link_count": 14,588 "reads": 8,589 "readers_count": 7,590 "score": 71.6,591 "yours": false,592 "topic_id": 117258,593 "topic_slug": "i-am-getting-this-error-mat1-and-mat2-shapes-cannot-be-multiplied-20x10-and-20x512",594 "display_username": "Sa",595 "primary_group_name": null,596 "flair_name": null,597 "flair_url": null,598 "flair_bg_color": null,599 "flair_color": null,600 "flair_group_id": null,601 "badges_granted": [],602 "version": 1,603 "can_edit": false,604 "can_delete": false,605 "can_recover": false,606 "can_see_hidden_post": false,607 "can_wiki": false,608 "read": true,609 "user_title": "",610 "bookmarked": false,611 "actions_summary": [],612 "moderator": false,613 "admin": false,614 "staff": false,615 "user_id": 23668,616 "hidden": false,617 "trust_level": 1,618 "deleted_at": null,619 "user_deleted": false,620 "edit_reason": null,621 "can_view_edit_history": true,622 "wiki": false,623 "post_url": "/t/i-am-getting-this-error-mat1-and-mat2-shapes-cannot-be-multiplied-20x10-and-20x512/117258/1",624 "can_accept_answer": false,625 "can_unaccept_answer": false,626 "accepted_answer": false,627 "topic_accepted_answer": null,628 "can_vote": false629 },630 {631 "id": 275507,632 "name": "Alban D",633 "username": "albanD",634 "avatar_template": "/user_avatar/discuss.pytorch.org/alband/{size}/215_2.png",635 "created_at": "2021-04-06T14:32:51.471Z",636 "cooked": "<p>Hi,</p>\n<p>Your code is pretty hard to read, you can use triple backticks ``` to nicely format it (like you would do on github).</p>\n<p>And the error happens because the second dimension of the first matrix must match the first dimension of the second, but here you have 10 and 20. I guess you want to transpose the first matrix?</p>",637 "post_number": 2,638 "post_type": 1,639 "posts_count": 3,640 "updated_at": "2021-04-06T14:32:51.471Z",641 "reply_count": 1,642 "reply_to_post_number": null,643 "quote_count": 0,644 "incoming_link_count": 2,645 "reads": 7,646 "readers_count": 6,647 "score": 16.4,648 "yours": false,649 "topic_id": 117258,650 "topic_slug": "i-am-getting-this-error-mat1-and-mat2-shapes-cannot-be-multiplied-20x10-and-20x512",651 "display_username": "Alban D",652 "primary_group_name": null,653 "flair_name": null,654 "flair_url": null,655 "flair_bg_color": null,656 "flair_color": null,657 "flair_group_id": null,658 "badges_granted": [],659 "version": 1,660 "can_edit": false,661 "can_delete": false,662 "can_recover": false,663 "can_see_hidden_post": false,664 "can_wiki": false,665 "read": true,666 "user_title": "",667 "bookmarked": false,668 "actions_summary": [],669 "moderator": true,670 "admin": true,671 "staff": true,672 "user_id": 211,673 "hidden": false,674 "trust_level": 4,675 "deleted_at": null,676 "user_deleted": false,677 "edit_reason": null,678 "can_view_edit_history": true,679 "wiki": false,680 "post_url": "/t/i-am-getting-this-error-mat1-and-mat2-shapes-cannot-be-multiplied-20x10-and-20x512/117258/2",681 "can_accept_answer": false,682 "can_unaccept_answer": false,683 "accepted_answer": false,684 "topic_accepted_answer": null685 },686 {687 "id": 275532,688 "name": "Sa",689 "username": "sam101",690 "avatar_template": "/user_avatar/discuss.pytorch.org/sam101/{size}/14962_2.png",691 "created_at": "2021-04-06T17:41:54.339Z",692 "cooked": "<p>Hi Alban, sorry for this. Here is the updated code.</p>\n<pre><code class=\"lang-auto\">encoder = StandardNormal(MLP(3000, latent_size,\n hidden_units=[512,256],\n activation='relu',\n x = x.view(x.shape[0], 3000).float() - 1))\ndecoder = StandardNormal(MLP(latent_size, 3000,\n hidden_units=[512,256],\n activation='relu',\n x = x.view(x.shape[0], 3000).float() - 1))\n\nmodel = Flow(base_dist=StandardNormal((latent_size,)),\n transforms=[\n VAE(encoder=encoder, decoder=decoder)\n ]).to(device)\n</code></pre>\n<p>No I have input matrix to the encoder with 3000 dimensions and I want to get back the 3000 dimensions from the decoder.</p>",693 "post_number": 3,694 "post_type": 1,695 "posts_count": 3,696 "updated_at": "2021-04-06T17:41:54.339Z",697 "reply_count": 0,698 "reply_to_post_number": 2,699 "quote_count": 0,700 "incoming_link_count": 2,701 "reads": 6,702 "readers_count": 5,703 "score": 11.2,704 "yours": false,705 "topic_id": 117258,706 "topic_slug": "i-am-getting-this-error-mat1-and-mat2-shapes-cannot-be-multiplied-20x10-and-20x512",707 "display_username": "Sa",708 "primary_group_name": null,709 "flair_name": null,710 "flair_url": null,711 "flair_bg_color": null,712 "flair_color": null,713 "flair_group_id": null,714 "badges_granted": [],715 "version": 1,716 "can_edit": false,717 "can_delete": false,718 "can_recover": false,719 "can_see_hidden_post": false,720 "can_wiki": false,721 "read": true,722 "user_title": "",723 "reply_to_user": {724 "id": 211,725 "username": "albanD",726 "name": "Alban D",727 "avatar_template": "/user_avatar/discuss.pytorch.org/alband/{size}/215_2.png"728 },729 "bookmarked": false,730 "actions_summary": [],731 "moderator": false,732 "admin": false,733 "staff": false,734 "user_id": 23668,735 "hidden": false,736 "trust_level": 1,737 "deleted_at": null,738 "user_deleted": false,739 "edit_reason": null,740 "can_view_edit_history": true,741 "wiki": false,742 "post_url": "/t/i-am-getting-this-error-mat1-and-mat2-shapes-cannot-be-multiplied-20x10-and-20x512/117258/3",743 "can_accept_answer": false,744 "can_unaccept_answer": false,745 "accepted_answer": false,746 "topic_accepted_answer": null747 }748 ],749 "stream": [750 275499,751 275507,752 275532753 ]754 },755 "timeline_lookup": [756 [757 1,758 1663759 ]760 ],761 "suggested_topics": [762 {763 "fancy_title": "How to use torch without nvidia dependencies",764 "id": 216296,765 "title": "How to use torch without nvidia dependencies",766 "slug": "how-to-use-torch-without-nvidia-dependencies",767 "posts_count": 7,768 "reply_count": 4,769 "highest_post_number": 7,770 "image_url": "https://discuss.pytorch.org/uploads/default/original/3X/0/d/0d7f52c069d82f965911f5b45070e7e0716e0d34.png",771 "created_at": "2025-02-06T03:03:59.414Z",772 "last_posted_at": "2025-02-06T08:13:26.997Z",773 "bumped": true,774 "bumped_at": "2025-02-06T08:13:26.997Z",775 "archetype": "regular",776 "unseen": false,777 "pinned": false,778 "unpinned": null,779 "visible": true,780 "closed": false,781 "archived": false,782 "bookmarked": null,783 "liked": null,784 "tags_descriptions": {},785 "like_count": 0,786 "views": 432,787 "category_id": 1,788 "featured_link": null,789 "has_accepted_answer": false,790 "posters": [791 {792 "extras": "latest",793 "description": "Original Poster, Most Recent Poster",794 "user": {795 "id": 82516,796 "username": "Wayne20-ops",797 "name": "Wayne20 Ops",798 "avatar_template": "/user_avatar/discuss.pytorch.org/wayne20-ops/{size}/75495_2.png",799 "trust_level": 0800 }801 },802 {803 "extras": null,804 "description": "Frequent Poster",805 "user": {806 "id": 19553,807 "username": "anantguptadbl",808 "name": "Anant Gupta",809 "avatar_template": "/user_avatar/discuss.pytorch.org/anantguptadbl/{size}/17784_2.png",810 "trust_level": 2811 }812 }813 ]814 },815 {816 "fancy_title": "H100 vs A100 Memory Usage Difference",817 "id": 214869,818 "title": "H100 vs A100 Memory Usage Difference",819 "slug": "h100-vs-a100-memory-usage-difference",820 "posts_count": 8,821 "reply_count": 5,822 "highest_post_number": 8,823 "image_url": null,824 "created_at": "2025-01-02T05:02:00.260Z",825 "last_posted_at": "2025-02-05T21:15:17.407Z",826 "bumped": true,827 "bumped_at": "2025-02-05T21:15:17.407Z",828 "archetype": "regular",829 "unseen": false,830 "pinned": false,831 "unpinned": null,832 "visible": true,833 "closed": false,834 "archived": false,835 "bookmarked": null,836 "liked": null,837 "tags_descriptions": {},838 "like_count": 1,839 "views": 722,840 "category_id": 1,841 "featured_link": null,842 "has_accepted_answer": false,843 "posters": [844 {845 "extras": null,846 "description": "Original Poster",847 "user": {848 "id": 75268,849 "username": "Ty4Reading",850 "name": "Ty",851 "avatar_template": "/user_avatar/discuss.pytorch.org/ty4reading/{size}/69516_2.png",852 "trust_level": 1853 }854 },855 {856 "extras": null,857 "description": "Frequent Poster",858 "user": {859 "id": 3534,860 "username": "ptrblck",861 "name": "",862 "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",863 "admin": true,864 "moderator": true,865 "trust_level": 2866 }867 },868 {869 "extras": null,870 "description": "Frequent Poster",871 "user": {872 "id": 41997,873 "username": "bdhirsh",874 "name": "Brian Hirsh",875 "avatar_template": "/user_avatar/discuss.pytorch.org/bdhirsh/{size}/74038_2.png",876 "trust_level": 2877 }878 },879 {880 "extras": "latest",881 "description": "Most Recent Poster",882 "user": {883 "id": 82492,884 "username": "ekomp",885 "name": "",886 "avatar_template": "/user_avatar/discuss.pytorch.org/ekomp/{size}/75513_2.png",887 "trust_level": 1888 }889 }890 ]891 },892 {893 "fancy_title": "Jit trace tuple construct and unpack; can’t keep track of inputs",894 "id": 215323,895 "title": "Jit trace tuple construct and unpack; can't keep track of inputs",896 "slug": "jit-trace-tuple-construct-and-unpack-cant-keep-track-of-inputs",897 "posts_count": 1,898 "reply_count": 0,899 "highest_post_number": 1,900 "image_url": "https://discuss.pytorch.org/uploads/default/original/3X/b/8/b8026c9f675e3298109d3cea395e8ff583233b7c.png",901 "created_at": "2025-01-13T11:36:10.798Z",902 "last_posted_at": "2025-01-13T11:36:10.855Z",903 "bumped": true,904 "bumped_at": "2025-01-13T11:41:25.178Z",905 "archetype": "regular",906 "unseen": false,907 "pinned": false,908 "unpinned": null,909 "visible": true,910 "closed": false,911 "archived": false,912 "bookmarked": null,913 "liked": null,914 "tags_descriptions": {},915 "like_count": 0,916 "views": 34,917 "category_id": 1,918 "featured_link": null,919 "has_accepted_answer": false,920 "posters": [921 {922 "extras": "latest single",923 "description": "Original Poster, Most Recent Poster",924 "user": {925 "id": 82053,926 "username": "Mohamed_Hassan1",927 "name": "Mohamed Hassan",928 "avatar_template": "/user_avatar/discuss.pytorch.org/mohamed_hassan1/{size}/75076_2.png",929 "trust_level": 1930 }931 }932 ]933 },934 {935 "fancy_title": "Advanced Indexing Not Update Values as Expected?",936 "id": 214642,937 "title": "Advanced Indexing Not Update Values as Expected?",938 "slug": "advanced-indexing-not-update-values-as-expected",939 "posts_count": 2,940 "reply_count": 0,941 "highest_post_number": 2,942 "image_url": null,943 "created_at": "2024-12-26T00:19:41.592Z",944 "last_posted_at": "2024-12-26T19:28:02.490Z",945 "bumped": true,946 "bumped_at": "2024-12-26T19:46:12.309Z",947 "archetype": "regular",948 "unseen": false,949 "pinned": false,950 "unpinned": null,951 "visible": true,952 "closed": false,953 "archived": false,954 "bookmarked": null,955 "liked": null,956 "tags_descriptions": {},957 "like_count": 0,958 "views": 54,959 "category_id": 1,960 "featured_link": null,961 "has_accepted_answer": true,962 "posters": [963 {964 "extras": null,965 "description": "Original Poster",966 "user": {967 "id": 81712,968 "username": "chouakifares",969 "name": "Chouakifares",970 "avatar_template": "/user_avatar/discuss.pytorch.org/chouakifares/{size}/74723_2.png",971 "trust_level": 1972 }973 },974 {975 "extras": "latest",976 "description": "Most Recent Poster, Accepted Answer",977 "user": {978 "id": 41396,979 "username": "soulitzer",980 "name": "",981 "avatar_template": "/letter_avatar_proxy/v4/letter/s/839c29/{size}.png",982 "trust_level": 2983 }984 }985 ]986 },987 {988 "fancy_title": "Compatibility issue between FramePack and RTX 5090 – CUDA Error",989 "id": 219699,990 "title": "Compatibility issue between FramePack and RTX 5090 – CUDA Error",991 "slug": "compatibility-issue-between-framepack-and-rtx-5090-cuda-error",992 "posts_count": 3,993 "reply_count": 1,994 "highest_post_number": 3,995 "image_url": null,996 "created_at": "2025-05-02T16:22:32.194Z",997 "last_posted_at": "2025-05-02T22:42:06.792Z",998 "bumped": true,999 "bumped_at": "2025-05-02T22:42:06.792Z",1000 "archetype": "regular",1001 "unseen": false,1002 "pinned": false,1003 "unpinned": null,1004 "visible": true,1005 "closed": false,1006 "archived": false,1007 "bookmarked": null,1008 "liked": null,1009 "tags_descriptions": {},1010 "like_count": 1,1011 "views": 661,1012 "category_id": 1,1013 "featured_link": null,1014 "has_accepted_answer": false,1015 "posters": [1016 {1017 "extras": "latest",1018 "description": "Original Poster, Most Recent Poster",1019 "user": {1020 "id": 84124,1021 "username": "Bernard_Vincent",1022 "name": "Bernard Vincent",1023 "avatar_template": "/user_avatar/discuss.pytorch.org/bernard_vincent/{size}/76886_2.png",1024 "trust_level": 01025 }1026 },1027 {1028 "extras": null,1029 "description": "Frequent Poster",1030 "user": {1031 "id": 3534,1032 "username": "ptrblck",1033 "name": "",1034 "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",1035 "admin": true,1036 "moderator": true,1037 "trust_level": 21038 }1039 }1040 ]1041 }1042 ],1043 "tags_descriptions": {},1044 "fancy_title": "I am getting this error : mat1 and mat2 shapes cannot be multiplied (20x10 and 20x512)",1045 "id": 117258,1046 "title": "I am getting this error : mat1 and mat2 shapes cannot be multiplied (20x10 and 20x512)",1047 "posts_count": 3,1048 "created_at": "2021-04-06T14:03:47.669Z",1049 "views": 359,1050 "reply_count": 1,1051 "like_count": 0,1052 "last_posted_at": "2021-04-06T17:41:54.339Z",1053 "visible": true,1054 "closed": false,1055 "archived": false,1056 "has_summary": false,1057 "archetype": "regular",1058 "slug": "i-am-getting-this-error-mat1-and-mat2-shapes-cannot-be-multiplied-20x10-and-20x512",1059 "category_id": 1,1060 "word_count": 200,1061 "deleted_at": null,1062 "user_id": 23668,1063 "featured_link": null,1064 "pinned_globally": false,1065 "pinned_at": null,1066 "pinned_until": null,1067 "image_url": null,1068 "slow_mode_seconds": 0,1069 "draft": null,1070 "draft_key": "topic_117258",1071 "draft_sequence": null,1072 "unpinned": null,1073 "pinned": false,1074 "current_post_number": 1,1075 "highest_post_number": 3,1076 "deleted_by": null,1077 "actions_summary": [1078 {1079 "id": 4,1080 "count": 0,1081 "hidden": false,1082 "can_act": false1083 },1084 {1085 "id": 8,1086 "count": 0,1087 "hidden": false,1088 "can_act": false1089 },1090 {1091 "id": 10,1092 "count": 0,1093 "hidden": false,1094 "can_act": false1095 },1096 {1097 "id": 7,1098 "count": 0,1099 "hidden": false,1100 "can_act": false1101 }1102 ],1103 "chunk_size": 20,1104 "bookmarked": false,1105 "topic_timer": null,1106 "message_bus_last_id": 0,1107 "participant_count": 2,1108 "show_read_indicator": false,1109 "thumbnails": null,1110 "slow_mode_enabled_until": null,1111 "can_vote": false,1112 "vote_count": 0,1113 "user_voted": false,1114 "discourse_zendesk_plugin_zendesk_id": null,1115 "discourse_zendesk_plugin_zendesk_url": "https://your-url.zendesk.com/agent/tickets/",1116 "details": {1117 "can_edit": false,1118 "notification_level": 1,1119 "participants": [1120 {1121 "id": 23668,1122 "username": "sam101",1123 "name": "Sa",1124 "avatar_template": "/user_avatar/discuss.pytorch.org/sam101/{size}/14962_2.png",1125 "post_count": 2,1126 "primary_group_name": null,1127 "flair_name": null,1128 "flair_url": null,1129 "flair_color": null,1130 "flair_bg_color": null,1131 "flair_group_id": null,1132 "trust_level": 11133 },1134 {1135 "id": 211,1136 "username": "albanD",1137 "name": "Alban D",1138 "avatar_template": "/user_avatar/discuss.pytorch.org/alband/{size}/215_2.png",1139 "post_count": 1,1140 "primary_group_name": null,1141 "flair_name": null,1142 "flair_url": null,1143 "flair_color": null,1144 "flair_bg_color": null,1145 "flair_group_id": null,1146 "admin": true,1147 "moderator": true,1148 "trust_level": 41149 }1150 ],1151 "created_by": {1152 "id": 23668,1153 "username": "sam101",1154 "name": "Sa",1155 "avatar_template": "/user_avatar/discuss.pytorch.org/sam101/{size}/14962_2.png"1156 },1157 "last_poster": {1158 "id": 23668,1159 "username": "sam101",1160 "name": "Sa",1161 "avatar_template": "/user_avatar/discuss.pytorch.org/sam101/{size}/14962_2.png"1162 }1163 },1164 "bookmarks": []1165 },1166 {1167 "post_stream": {1168 "posts": [1169 {1170 "id": 275333,1171 "name": "Nitish Agarwal",1172 "username": "Nitish1",1173 "avatar_template": "/letter_avatar_proxy/v4/letter/n/e47774/{size}.png",1174 "created_at": "2021-04-06T02:42:32.871Z",1175 "cooked": "<pre><code class=\"lang-auto\"> def forward(self, image, proj, proj_inv):\n return self.predict_2d_joint_locations(image, proj, proj_inv)\n\n def criterion(self, predicted, gt):\n return self.mse(predicted, gt)\n\n def training_step(self, batch, batch_idx):\n player_images, j2d, j3d, proj, proj_inv, is_synth = batch\n predicted_2d_joint_locations = self.predict_2d_joint_locations(player_images, proj, proj_inv)\n train_loss = self.criterion(predicted_2d_joint_locations, j2d)\n self.log('train_loss', train_loss)\n return train_loss\n\n def validation_step(self, batch, batch_idx):\n player_images, j2d, j3d, proj, proj_inv, is_synth = batch\n predicted_2d_joint_locations = self.predict_2d_joint_locations(player_images, proj, proj_inv)\n val_loss = self.criterion(predicted_2d_joint_locations, j2d)\n self.log('val_loss', val_loss)\n return val_loss\n</code></pre>\n<p>I have this simple code for <code>training_step()</code> and <code>forward()</code>. Both the functions essentially do the same.</p>\n<p>Owing to a relatively small dataset, my model grossly overfits on the training data (as is evident from there being an orders of magnitude of difference between the training and validation losses). But that’s fine for now, I am perfectly aware of that and will add more data soon.</p>\n<p>What surprises me is when I try to evaluate (infer). I don’t have a separate test set (for now) and only have a training and a validation set. When I evaluate on the validation set, the mean squared error turns out to be in the same range as the validation loss my model is based on as expected. However, when I evaluate on the training set, the mean squared error I get is again in the same range as the validation loss (not the training loss).</p>\n<pre><code class=\"lang-auto\"> if args.val:\n check_dl = dataset.val_dataloader()\n else:\n check_dl = dataset.train_dataloader()\n\n for player_images,j2d,j3d,proj,proj_inv,is_synth in check_dl:\n if args.visualize:\n # visualize dataset\n player_images = player_images.cpu().numpy()\n j2d_predicted = model(torch.from_numpy(player_images), proj, proj_inv).cpu().detach().numpy()\n print(((j2d - j2d_predicted) ** 2).mean(), model.training_step((torch.from_numpy(player_images),j2d,j3d,proj,proj_inv,is_synth), 0))\n</code></pre>\n<p>When I print <code>print(((j2d - j2d_predicted) ** 2).mean()</code> for images in the training set after fetching the model from the trained checkpoint, I get numbers in the range of the validation loss. I retried the same by printing the loss using the <code>training_step()</code> function, but I again receive high losses (in the validation loss range).</p>\n<p><strong>Note:</strong> The inference mean squared errors I receive on the training set are high but they are not as high as when the training actually started. So, the pre-trained model is being fetched properly. On a model with completely random weights, I should have received orders of magnitudes of higher errors. So, the model is definitely fetched correctly.</p>\n<p>I have been scratching my head over this. Any help would be really appreciated.</p>",1176 "post_number": 1,1177 "post_type": 1,1178 "posts_count": 1,1179 "updated_at": "2021-04-06T17:20:58.121Z",1180 "reply_count": 0,1181 "reply_to_post_number": null,1182 "quote_count": 0,1183 "incoming_link_count": 20,1184 "reads": 9,1185 "readers_count": 8,1186 "score": 101.8,1187 "yours": false,1188 "topic_id": 117175,1189 "topic_slug": "evaluation-loss-on-the-training-set-higher-than-loss-during-training",1190 "display_username": "Nitish Agarwal",1191 "primary_group_name": null,1192 "flair_name": null,1193 "flair_url": null,1194 "flair_bg_color": null,1195 "flair_color": null,1196 "flair_group_id": null,1197 "badges_granted": [],1198 "version": 3,1199 "can_edit": false,1200 "can_delete": false,