Anurag1734/cuda-error-resolution-analysis
07
1[2 {3 "post_stream": {4 "posts": [5 {6 "id": 304230,7 "name": "Hui Wei",8 "username": "huiwei",9 "avatar_template": "/letter_avatar_proxy/v4/letter/h/919ad9/{size}.png",10 "created_at": "2021-08-31T17:11:41.158Z",11 "cooked": "<p>Hi All,</p>\n<p>I am training ResNet on CIFAR-10 dataset and doing TenCrop data augmentation as ResNet suggests. However, I found that after TenCrop (please see the implementation of my dataset below), 10 pictures cropped from the same picture will be glued together in a batch even I turn on <code>shuffle=True</code>. I am wondering if there is any way to solve this (i.e. to treat 10 pictures independently as we normally do for training pictures: crop 1 in batch i, crop 2 in batch j,…, instead of crop 1-10 all in the same batch)? Or for the training, this does not matter? I thought this problem matters since glueing all cropped pictures will decrease the randomness/variance of gradients which is more likely to be overfitting according to the second answer of <a href=\"https://datascience.stackexchange.com/questions/24511/why-should-the-data-be-shuffled-for-machine-learning-tasks\" rel=\"noopener nofollow ugc\">this thread</a>, but I am not sure.</p>\n<p>My implementation:</p>\n<pre><code class=\"lang-auto\">class CIFAR10(Dataset):\n def __init__(self, data_path, dataset, data_aug=False):\n \"\"\"\n data_path: folder storing train, valid and test set\n dataset: \"train\", \"valid\" or \"test\"\n data_aug: if use data augmentation, default: False\n \"\"\"\n # initialize object variables\n self.data_aug = data_aug\n\n # read in the dataset\n with open(f\"{data_path}/{dataset}_set.pkl\", \"rb\") as fin:\n self.cifar_imgs = pickle.load(fin)\n\n # define transform\n # we keep the original image size 32*32, same as experiments in ResNet paper\n # Note that after ToTensor, the value of each pixel becomes [0,1]\n # then we can apply Normalize\n if data_aug:\n # Here the data augmentation is based on https://arxiv.org/pdf/1409.5185.pdf\n # Also, please take a look at PyTorch doc about how to solve dimension\n # problems due to tuples returned by TenCrop()\n self.transformations = transforms.Compose([\n transforms.Pad(padding=4),\n transforms.TenCrop(32, vertical_flip=False), # return a tuple of 10 PIL images\n transforms.Lambda(lambda crops: torch.stack([transforms.ToTensor()(crop) for crop in crops])), # convert the tuple into [B, C, H, W] \n transforms.Lambda(lambda tensors: torch.stack([transforms.Normalize((0.4914, 0.4822, 0.4465), (0.2470, 0.2435, 0.2616))(t) for t in tensors]))\n ]) # Note: valid and test should not use data aug\n else:\n self.transformations = transforms.Compose([\n transforms.ToTensor(),\n transforms.Normalize((0.4914, 0.4822, 0.4465), (0.2470, 0.2435, 0.2616))\n ]) \n \n def __getitem__(self, index):\n img = Image.fromarray(self.cifar_imgs[index][0]) # convert to PIL image\n label = self.cifar_imgs[index][1]\n \n # transform the image\n img = self.transformations(img)\n\n return img, label\n\n def __len__(self): \n # notice that we cannot return the length of the list after data augmentation\n # otherwise, the sampler will sample from 1 to length after data augmentation\n # which will cause out of range error when getting items\n return len(self.cifar_imgs) \n</code></pre>\n<p>Also, I used the trick in the PyTorch doc to deal with the inconsistency of dimension (4D vs. 5D) as follows:</p>\n<pre><code class=\"lang-auto\">if if_aug:\n bs, ncrops, c, h, w = img.size()\n img = img.view(-1, c, h, w)\n label = torch.repeat_interleave(label, 10) \n</code></pre>",12 "post_number": 1,13 "post_type": 1,14 "posts_count": 1,15 "updated_at": "2021-08-31T17:15:56.376Z",16 "reply_count": 0,17 "reply_to_post_number": null,18 "quote_count": 0,19 "incoming_link_count": 63,20 "reads": 3,21 "readers_count": 2,22 "score": 315.6,23 "yours": false,24 "topic_id": 130772,25 "topic_slug": "randomize-tencrop-data-augmentation",26 "display_username": "Hui Wei",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://datascience.stackexchange.com/questions/24511/why-should-the-data-be-shuffled-for-machine-learning-tasks",43 "internal": false,44 "reflection": false,45 "title": "neural network - Why should the data be shuffled for machine learning tasks - Data Science Stack Exchange",46 "clicks": 047 }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": 15345,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/randomize-tencrop-data-augmentation/130772/1",65 "can_accept_answer": false,66 "can_unaccept_answer": false,67 "accepted_answer": false,68 "topic_accepted_answer": null,69 "can_vote": false70 }71 ],72 "stream": [73 30423074 ]75 },76 "timeline_lookup": [77 [78 1,79 151680 ]81 ],82 "suggested_topics": [83 {84 "fancy_title": "Strange inference behaviour with batch_size = 1",85 "id": 216782,86 "title": "Strange inference behaviour with batch_size = 1",87 "slug": "strange-inference-behaviour-with-batch-size-1",88 "posts_count": 1,89 "reply_count": 0,90 "highest_post_number": 1,91 "image_url": null,92 "created_at": "2025-02-17T15:44:28.370Z",93 "last_posted_at": "2025-02-17T15:44:28.411Z",94 "bumped": true,95 "bumped_at": "2025-02-17T15:46:14.721Z",96 "archetype": "regular",97 "unseen": false,98 "pinned": false,99 "unpinned": null,100 "visible": true,101 "closed": false,102 "archived": false,103 "bookmarked": null,104 "liked": null,105 "tags_descriptions": {},106 "like_count": 0,107 "views": 28,108 "category_id": 5,109 "featured_link": null,110 "has_accepted_answer": false,111 "posters": [112 {113 "extras": "latest single",114 "description": "Original Poster, Most Recent Poster",115 "user": {116 "id": 64392,117 "username": "Dimitris_Z",118 "name": "Dimitris Zaro",119 "avatar_template": "/user_avatar/discuss.pytorch.org/dimitris_z/{size}/58548_2.png",120 "trust_level": 1121 }122 }123 ]124 },125 {126 "fancy_title": "Custom Dataset __getitem__ is receiving a list from DataLoader",127 "id": 217592,128 "title": "Custom Dataset __getitem__ is receiving a list from DataLoader",129 "slug": "custom-dataset-getitem-is-receiving-a-list-from-dataloader",130 "posts_count": 4,131 "reply_count": 2,132 "highest_post_number": 4,133 "image_url": null,134 "created_at": "2025-03-08T12:27:38.663Z",135 "last_posted_at": "2025-03-14T05:32:05.342Z",136 "bumped": true,137 "bumped_at": "2025-03-14T05:32:05.342Z",138 "archetype": "regular",139 "unseen": false,140 "pinned": false,141 "unpinned": null,142 "visible": true,143 "closed": false,144 "archived": false,145 "bookmarked": null,146 "liked": null,147 "tags_descriptions": {},148 "like_count": 0,149 "views": 77,150 "category_id": 5,151 "featured_link": null,152 "has_accepted_answer": false,153 "posters": [154 {155 "extras": null,156 "description": "Original Poster",157 "user": {158 "id": 83139,159 "username": "Gabrichilleron",160 "name": "Gabriel Chilleron peinado",161 "avatar_template": "/user_avatar/discuss.pytorch.org/gabrichilleron/{size}/76040_2.png",162 "trust_level": 0163 }164 },165 {166 "extras": null,167 "description": "Frequent Poster",168 "user": {169 "id": 69167,170 "username": "lostalot",171 "name": "",172 "avatar_template": "/letter_avatar_proxy/v4/letter/l/858c86/{size}.png",173 "trust_level": 1174 }175 },176 {177 "extras": "latest",178 "description": "Most Recent Poster",179 "user": {180 "id": 74591,181 "username": "UMAR_MASUD",182 "name": "UMAR MASUD",183 "avatar_template": "/user_avatar/discuss.pytorch.org/umar_masud/{size}/68863_2.png",184 "trust_level": 2185 }186 }187 ]188 },189 {190 "fancy_title": "Targeted Image Augmentation",191 "id": 215621,192 "title": "Targeted Image Augmentation",193 "slug": "targeted-image-augmentation",194 "posts_count": 3,195 "reply_count": 1,196 "highest_post_number": 3,197 "image_url": null,198 "created_at": "2025-01-20T12:20:38.861Z",199 "last_posted_at": "2025-01-21T08:44:57.139Z",200 "bumped": true,201 "bumped_at": "2025-01-21T08:44:57.139Z",202 "archetype": "regular",203 "unseen": false,204 "pinned": false,205 "unpinned": null,206 "visible": true,207 "closed": false,208 "archived": false,209 "bookmarked": null,210 "liked": null,211 "tags_descriptions": {},212 "like_count": 1,213 "views": 191,214 "category_id": 5,215 "featured_link": null,216 "has_accepted_answer": false,217 "posters": [218 {219 "extras": "latest",220 "description": "Original Poster, Most Recent Poster",221 "user": {222 "id": 81941,223 "username": "MUSTAFA_CAGRI_CIVICI",224 "name": "MUSTAFA ÇAĞRI ÇİVİCİ",225 "avatar_template": "/user_avatar/discuss.pytorch.org/mustafa_cagri_civici/{size}/74964_2.png",226 "trust_level": 1227 }228 },229 {230 "extras": null,231 "description": "Frequent Poster",232 "user": {233 "id": 18088,234 "username": "KFrank",235 "name": "K. Frank",236 "avatar_template": "/letter_avatar_proxy/v4/letter/k/ecb155/{size}.png",237 "trust_level": 2238 }239 }240 ]241 },242 {243 "fancy_title": "RuntimeError: The size of tensor a (32769) must match the size of tensor b (512) at non-singleton dimension 3",244 "id": 212710,245 "title": "RuntimeError: The size of tensor a (32769) must match the size of tensor b (512) at non-singleton dimension 3",246 "slug": "runtimeerror-the-size-of-tensor-a-32769-must-match-the-size-of-tensor-b-512-at-non-singleton-dimension-3",247 "posts_count": 1,248 "reply_count": 0,249 "highest_post_number": 1,250 "image_url": null,251 "created_at": "2024-11-08T14:37:35.034Z",252 "last_posted_at": "2024-11-08T14:37:35.086Z",253 "bumped": true,254 "bumped_at": "2024-11-08T14:37:35.086Z",255 "archetype": "regular",256 "unseen": false,257 "pinned": false,258 "unpinned": null,259 "visible": true,260 "closed": false,261 "archived": false,262 "bookmarked": null,263 "liked": null,264 "tags_descriptions": {},265 "like_count": 0,266 "views": 85,267 "category_id": 5,268 "featured_link": null,269 "has_accepted_answer": false,270 "posters": [271 {272 "extras": "latest single",273 "description": "Original Poster, Most Recent Poster",274 "user": {275 "id": 44619,276 "username": "CasellaJr",277 "name": "Bruno Casella",278 "avatar_template": "/letter_avatar_proxy/v4/letter/c/50afbb/{size}.png",279 "trust_level": 1280 }281 }282 ]283 },284 {285 "fancy_title": "Help with a 3d unet",286 "id": 217679,287 "title": "Help with a 3d unet",288 "slug": "help-with-a-3d-unet",289 "posts_count": 1,290 "reply_count": 0,291 "highest_post_number": 1,292 "image_url": null,293 "created_at": "2025-03-10T22:33:48.535Z",294 "last_posted_at": "2025-03-10T22:33:48.577Z",295 "bumped": true,296 "bumped_at": "2025-03-10T22:33:48.577Z",297 "archetype": "regular",298 "unseen": false,299 "pinned": false,300 "unpinned": null,301 "visible": true,302 "closed": false,303 "archived": false,304 "bookmarked": null,305 "liked": null,306 "tags_descriptions": {},307 "like_count": 0,308 "views": 32,309 "category_id": 5,310 "featured_link": null,311 "has_accepted_answer": false,312 "posters": [313 {314 "extras": "latest single",315 "description": "Original Poster, Most Recent Poster",316 "user": {317 "id": 74076,318 "username": "Zotnam",319 "name": "pasquale c.",320 "avatar_template": "/user_avatar/discuss.pytorch.org/zotnam/{size}/68428_2.png",321 "trust_level": 1322 }323 }324 ]325 }326 ],327 "tags_descriptions": {},328 "fancy_title": "Randomize TenCrop Data Augmentation",329 "id": 130772,330 "title": "Randomize TenCrop Data Augmentation",331 "posts_count": 1,332 "created_at": "2021-08-31T17:11:41.042Z",333 "views": 368,334 "reply_count": 0,335 "like_count": 0,336 "last_posted_at": "2021-08-31T17:11:41.158Z",337 "visible": true,338 "closed": false,339 "archived": false,340 "has_summary": false,341 "archetype": "regular",342 "slug": "randomize-tencrop-data-augmentation",343 "category_id": 5,344 "word_count": 494,345 "deleted_at": null,346 "user_id": 15345,347 "featured_link": null,348 "pinned_globally": false,349 "pinned_at": null,350 "pinned_until": null,351 "image_url": null,352 "slow_mode_seconds": 0,353 "draft": null,354 "draft_key": "topic_130772",355 "draft_sequence": null,356 "unpinned": null,357 "pinned": false,358 "current_post_number": 1,359 "highest_post_number": 1,360 "deleted_by": null,361 "actions_summary": [362 {363 "id": 4,364 "count": 0,365 "hidden": false,366 "can_act": false367 },368 {369 "id": 8,370 "count": 0,371 "hidden": false,372 "can_act": false373 },374 {375 "id": 10,376 "count": 0,377 "hidden": false,378 "can_act": false379 },380 {381 "id": 7,382 "count": 0,383 "hidden": false,384 "can_act": false385 }386 ],387 "chunk_size": 20,388 "bookmarked": false,389 "topic_timer": null,390 "message_bus_last_id": 0,391 "participant_count": 1,392 "show_read_indicator": false,393 "thumbnails": null,394 "slow_mode_enabled_until": null,395 "can_vote": false,396 "vote_count": 0,397 "user_voted": false,398 "discourse_zendesk_plugin_zendesk_id": null,399 "discourse_zendesk_plugin_zendesk_url": "https://your-url.zendesk.com/agent/tickets/",400 "details": {401 "can_edit": false,402 "notification_level": 1,403 "participants": [404 {405 "id": 15345,406 "username": "huiwei",407 "name": "Hui Wei",408 "avatar_template": "/letter_avatar_proxy/v4/letter/h/919ad9/{size}.png",409 "post_count": 1,410 "primary_group_name": null,411 "flair_name": null,412 "flair_url": null,413 "flair_color": null,414 "flair_bg_color": null,415 "flair_group_id": null,416 "trust_level": 1417 }418 ],419 "created_by": {420 "id": 15345,421 "username": "huiwei",422 "name": "Hui Wei",423 "avatar_template": "/letter_avatar_proxy/v4/letter/h/919ad9/{size}.png"424 },425 "last_poster": {426 "id": 15345,427 "username": "huiwei",428 "name": "Hui Wei",429 "avatar_template": "/letter_avatar_proxy/v4/letter/h/919ad9/{size}.png"430 }431 },432 "bookmarks": []433 },434 {435 "post_stream": {436 "posts": [437 {438 "id": 304219,439 "name": "",440 "username": "AlphaBetaGamma96",441 "avatar_template": "/letter_avatar_proxy/v4/letter/a/3da27b/{size}.png",442 "created_at": "2021-08-31T16:27:23.113Z",443 "cooked": "<p>Hi All,</p>\n<p>I was wondering if it’s at all possible to efficiently convert all my model parameters from float32 to float64? I’ve pretrained my model in float32, but when running it I get a NaN error but I know that model works within float64. So, I’d ideally like to just reformat my dtype.</p>\n<p>Is there a way to easily change my model parameters from float32 to float64?</p>\n<p>Any help is appreicated! <img src=\"https://discuss.pytorch.org/images/emoji/apple/slight_smile.png?v=10\" title=\":slight_smile:\" class=\"emoji\" alt=\":slight_smile:\"></p>",444 "post_number": 1,445 "post_type": 1,446 "posts_count": 5,447 "updated_at": "2021-08-31T16:27:23.113Z",448 "reply_count": 0,449 "reply_to_post_number": null,450 "quote_count": 0,451 "incoming_link_count": 4032,452 "reads": 60,453 "readers_count": 59,454 "score": 20132.0,455 "yours": false,456 "topic_id": 130767,457 "topic_slug": "is-there-an-efficient-way-to-convert-a-model-with-float32-params-to-float64",458 "display_username": "",459 "primary_group_name": null,460 "flair_name": null,461 "flair_url": null,462 "flair_bg_color": null,463 "flair_color": null,464 "flair_group_id": null,465 "badges_granted": [],466 "version": 1,467 "can_edit": false,468 "can_delete": false,469 "can_recover": false,470 "can_see_hidden_post": false,471 "can_wiki": false,472 "read": true,473 "user_title": "",474 "bookmarked": false,475 "actions_summary": [476 {477 "id": 2,478 "count": 1479 }480 ],481 "moderator": false,482 "admin": false,483 "staff": false,484 "user_id": 34294,485 "hidden": false,486 "trust_level": 2,487 "deleted_at": null,488 "user_deleted": false,489 "edit_reason": null,490 "can_view_edit_history": true,491 "wiki": false,492 "post_url": "/t/is-there-an-efficient-way-to-convert-a-model-with-float32-params-to-float64/130767/1",493 "can_accept_answer": false,494 "can_unaccept_answer": false,495 "accepted_answer": false,496 "topic_accepted_answer": null,497 "can_vote": false498 },499 {500 "id": 304221,501 "name": "Emil Bogomolov",502 "username": "zetyquickly",503 "avatar_template": "/user_avatar/discuss.pytorch.org/zetyquickly/{size}/22489_2.png",504 "created_at": "2021-08-31T16:31:40.258Z",505 "cooked": "<p>Hey <a class=\"mention\" href=\"/u/alphabetagamma96\">@AlphaBetaGamma96</a></p>\n<p>Have you tried to do <code>model.double()</code> that should convert model parameters to <code>float64</code>?</p>\n<p>After that be aware that inputs of the model should also be tensors of double precision</p>",506 "post_number": 2,507 "post_type": 1,508 "posts_count": 5,509 "updated_at": "2021-08-31T16:31:40.258Z",510 "reply_count": 1,511 "reply_to_post_number": null,512 "quote_count": 0,513 "incoming_link_count": 23,514 "reads": 60,515 "readers_count": 59,516 "score": 162.0,517 "yours": false,518 "topic_id": 130767,519 "topic_slug": "is-there-an-efficient-way-to-convert-a-model-with-float32-params-to-float64",520 "display_username": "Emil Bogomolov",521 "primary_group_name": null,522 "flair_name": null,523 "flair_url": null,524 "flair_bg_color": null,525 "flair_color": null,526 "flair_group_id": null,527 "badges_granted": [],528 "version": 1,529 "can_edit": false,530 "can_delete": false,531 "can_recover": false,532 "can_see_hidden_post": false,533 "can_wiki": false,534 "read": true,535 "user_title": null,536 "bookmarked": false,537 "actions_summary": [538 {539 "id": 2,540 "count": 2541 }542 ],543 "moderator": false,544 "admin": false,545 "staff": false,546 "user_id": 23886,547 "hidden": false,548 "trust_level": 2,549 "deleted_at": null,550 "user_deleted": false,551 "edit_reason": null,552 "can_view_edit_history": true,553 "wiki": false,554 "post_url": "/t/is-there-an-efficient-way-to-convert-a-model-with-float32-params-to-float64/130767/2",555 "can_accept_answer": false,556 "can_unaccept_answer": false,557 "accepted_answer": false,558 "topic_accepted_answer": null559 },560 {561 "id": 304224,562 "name": "",563 "username": "AlphaBetaGamma96",564 "avatar_template": "/letter_avatar_proxy/v4/letter/a/3da27b/{size}.png",565 "created_at": "2021-08-31T16:49:55.118Z",566 "cooked": "<p>Great that works for my model, but there are one or two other variables that I need to convert (that are outside my <code>model</code>).</p>\n<p>I’ve tried applying this to my optimizer, and it yields <code>AttributeError: 'Adam' object has no attribute 'double'</code> (when calling <code>optim.double()</code>)· I’d assume this is because <code>model</code> subclasses from <code>nn.Module</code> whereas <code>optim</code> subclasses from <code>torch.optim.Optimizer</code>. Is there a way to apply this to the optimzier as well?</p>\n<p>Thank you! <img src=\"https://discuss.pytorch.org/images/emoji/apple/slight_smile.png?v=10\" title=\":slight_smile:\" class=\"emoji\" alt=\":slight_smile:\"></p>",567 "post_number": 3,568 "post_type": 1,569 "posts_count": 5,570 "updated_at": "2021-08-31T16:49:55.118Z",571 "reply_count": 1,572 "reply_to_post_number": 2,573 "quote_count": 0,574 "incoming_link_count": 45,575 "reads": 59,576 "readers_count": 58,577 "score": 236.8,578 "yours": false,579 "topic_id": 130767,580 "topic_slug": "is-there-an-efficient-way-to-convert-a-model-with-float32-params-to-float64",581 "display_username": "",582 "primary_group_name": null,583 "flair_name": null,584 "flair_url": null,585 "flair_bg_color": null,586 "flair_color": null,587 "flair_group_id": null,588 "badges_granted": [],589 "version": 1,590 "can_edit": false,591 "can_delete": false,592 "can_recover": false,593 "can_see_hidden_post": false,594 "can_wiki": false,595 "read": true,596 "user_title": "",597 "reply_to_user": {598 "id": 23886,599 "username": "zetyquickly",600 "name": "Emil Bogomolov",601 "avatar_template": "/user_avatar/discuss.pytorch.org/zetyquickly/{size}/22489_2.png"602 },603 "bookmarked": false,604 "actions_summary": [],605 "moderator": false,606 "admin": false,607 "staff": false,608 "user_id": 34294,609 "hidden": false,610 "trust_level": 2,611 "deleted_at": null,612 "user_deleted": false,613 "edit_reason": null,614 "can_view_edit_history": true,615 "wiki": false,616 "post_url": "/t/is-there-an-efficient-way-to-convert-a-model-with-float32-params-to-float64/130767/3",617 "can_accept_answer": false,618 "can_unaccept_answer": false,619 "accepted_answer": false,620 "topic_accepted_answer": null621 },622 {623 "id": 304226,624 "name": "Emil Bogomolov",625 "username": "zetyquickly",626 "avatar_template": "/user_avatar/discuss.pytorch.org/zetyquickly/{size}/22489_2.png",627 "created_at": "2021-08-31T16:56:26.830Z",628 "cooked": "<p>I believe there’s no need to do that with optimizer. To reinitialize optimizer on new version of the model do <code>optimizer = optim.Adam(model.parameters())</code></p>",629 "post_number": 4,630 "post_type": 1,631 "posts_count": 5,632 "updated_at": "2021-08-31T16:56:26.830Z",633 "reply_count": 1,634 "reply_to_post_number": 3,635 "quote_count": 0,636 "incoming_link_count": 15,637 "reads": 54,638 "readers_count": 53,639 "score": 90.8,640 "yours": false,641 "topic_id": 130767,642 "topic_slug": "is-there-an-efficient-way-to-convert-a-model-with-float32-params-to-float64",643 "display_username": "Emil Bogomolov",644 "primary_group_name": null,645 "flair_name": null,646 "flair_url": null,647 "flair_bg_color": null,648 "flair_color": null,649 "flair_group_id": null,650 "badges_granted": [],651 "version": 1,652 "can_edit": false,653 "can_delete": false,654 "can_recover": false,655 "can_see_hidden_post": false,656 "can_wiki": false,657 "read": true,658 "user_title": null,659 "reply_to_user": {660 "id": 34294,661 "username": "AlphaBetaGamma96",662 "name": "",663 "avatar_template": "/letter_avatar_proxy/v4/letter/a/3da27b/{size}.png"664 },665 "bookmarked": false,666 "actions_summary": [],667 "moderator": false,668 "admin": false,669 "staff": false,670 "user_id": 23886,671 "hidden": false,672 "trust_level": 2,673 "deleted_at": null,674 "user_deleted": false,675 "edit_reason": null,676 "can_view_edit_history": true,677 "wiki": false,678 "post_url": "/t/is-there-an-efficient-way-to-convert-a-model-with-float32-params-to-float64/130767/4",679 "can_accept_answer": false,680 "can_unaccept_answer": false,681 "accepted_answer": false,682 "topic_accepted_answer": null683 },684 {685 "id": 304229,686 "name": "",687 "username": "AlphaBetaGamma96",688 "avatar_template": "/letter_avatar_proxy/v4/letter/a/3da27b/{size}.png",689 "created_at": "2021-08-31T17:06:30.076Z",690 "cooked": "<p>Valid point, I did ‘solve’ that issue by using <code>torch.set_default_dtype(torch.float64)</code> but it does make sense to reinitialize the optimizer after pre-training!</p>",691 "post_number": 5,692 "post_type": 1,693 "posts_count": 5,694 "updated_at": "2021-08-31T17:06:30.076Z",695 "reply_count": 0,696 "reply_to_post_number": 4,697 "quote_count": 0,698 "incoming_link_count": 21,699 "reads": 47,700 "readers_count": 46,701 "score": 129.4,702 "yours": false,703 "topic_id": 130767,704 "topic_slug": "is-there-an-efficient-way-to-convert-a-model-with-float32-params-to-float64",705 "display_username": "",706 "primary_group_name": null,707 "flair_name": null,708 "flair_url": null,709 "flair_bg_color": null,710 "flair_color": null,711 "flair_group_id": null,712 "badges_granted": [],713 "version": 1,714 "can_edit": false,715 "can_delete": false,716 "can_recover": false,717 "can_see_hidden_post": false,718 "can_wiki": false,719 "read": true,720 "user_title": "",721 "reply_to_user": {722 "id": 23886,723 "username": "zetyquickly",724 "name": "Emil Bogomolov",725 "avatar_template": "/user_avatar/discuss.pytorch.org/zetyquickly/{size}/22489_2.png"726 },727 "bookmarked": false,728 "actions_summary": [729 {730 "id": 2,731 "count": 1732 }733 ],734 "moderator": false,735 "admin": false,736 "staff": false,737 "user_id": 34294,738 "hidden": false,739 "trust_level": 2,740 "deleted_at": null,741 "user_deleted": false,742 "edit_reason": null,743 "can_view_edit_history": true,744 "wiki": false,745 "post_url": "/t/is-there-an-efficient-way-to-convert-a-model-with-float32-params-to-float64/130767/5",746 "can_accept_answer": false,747 "can_unaccept_answer": false,748 "accepted_answer": false,749 "topic_accepted_answer": null750 }751 ],752 "stream": [753 304219,754 304221,755 304224,756 304226,757 304229758 ]759 },760 "timeline_lookup": [761 [762 1,763 1516764 ]765 ],766 "suggested_topics": [767 {768 "fancy_title": "Questions about linter for PyTorch",769 "id": 217769,770 "title": "Questions about linter for PyTorch",771 "slug": "questions-about-linter-for-pytorch",772 "posts_count": 4,773 "reply_count": 2,774 "highest_post_number": 4,775 "image_url": null,776 "created_at": "2025-03-13T01:37:04.296Z",777 "last_posted_at": "2025-03-28T12:59:01.624Z",778 "bumped": true,779 "bumped_at": "2025-03-28T12:59:01.624Z",780 "archetype": "regular",781 "unseen": false,782 "pinned": false,783 "unpinned": null,784 "visible": true,785 "closed": false,786 "archived": false,787 "bookmarked": null,788 "liked": null,789 "tags_descriptions": {},790 "like_count": 1,791 "views": 143,792 "category_id": 1,793 "featured_link": null,794 "has_accepted_answer": false,795 "posters": [796 {797 "extras": null,798 "description": "Original Poster",799 "user": {800 "id": 72718,801 "username": "shaoyu_young",802 "name": "shaoyu young",803 "avatar_template": "/user_avatar/discuss.pytorch.org/shaoyu_young/{size}/63697_2.png",804 "trust_level": 1805 }806 },807 {808 "extras": null,809 "description": "Frequent Poster",810 "user": {811 "id": 68149,812 "username": "Soumya_Kundu",813 "name": "Soumya Snigdha Kundu",814 "avatar_template": "/user_avatar/discuss.pytorch.org/soumya_kundu/{size}/71716_2.png",815 "trust_level": 2816 }817 },818 {819 "extras": "latest",820 "description": "Most Recent Poster",821 "user": {822 "id": 3534,823 "username": "ptrblck",824 "name": "",825 "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",826 "admin": true,827 "moderator": true,828 "trust_level": 2829 }830 }831 ]832 },833 {834 "fancy_title": "How I can improve validation loss in multi class text classification",835 "id": 214030,836 "title": "How I can improve validation loss in multi class text classification",837 "slug": "how-i-can-improve-validation-loss-in-multi-class-text-classification",838 "posts_count": 1,839 "reply_count": 0,840 "highest_post_number": 1,841 "image_url": null,842 "created_at": "2024-12-10T06:44:26.508Z",843 "last_posted_at": "2024-12-10T06:44:26.561Z",844 "bumped": true,845 "bumped_at": "2024-12-10T06:44:26.561Z",846 "archetype": "regular",847 "unseen": false,848 "pinned": false,849 "unpinned": null,850 "visible": true,851 "closed": false,852 "archived": false,853 "bookmarked": null,854 "liked": null,855 "tags_descriptions": {},856 "like_count": 0,857 "views": 32,858 "category_id": 1,859 "featured_link": null,860 "has_accepted_answer": false,861 "posters": [862 {863 "extras": "latest single",864 "description": "Original Poster, Most Recent Poster",865 "user": {866 "id": 81420,867 "username": "Gaurang_Gohel",868 "name": "Gaurang Gohel",869 "avatar_template": "/user_avatar/discuss.pytorch.org/gaurang_gohel/{size}/73797_2.png",870 "trust_level": 0871 }872 }873 ]874 },875 {876 "fancy_title": "multiprocessing.get_context(‘spawn’).Pool creates too many processes",877 "id": 215951,878 "title": "multiprocessing.get_context('spawn').Pool creates too many processes",879 "slug": "multiprocessing-get-context-spawn-pool-creates-too-many-processes",880 "posts_count": 2,881 "reply_count": 0,882 "highest_post_number": 2,883 "image_url": null,884 "created_at": "2025-01-27T18:04:44.483Z",885 "last_posted_at": "2025-01-27T18:49:00.462Z",886 "bumped": true,887 "bumped_at": "2025-01-27T18:49:00.462Z",888 "archetype": "regular",889 "unseen": false,890 "pinned": false,891 "unpinned": null,892 "visible": true,893 "closed": false,894 "archived": false,895 "bookmarked": null,896 "liked": null,897 "tags_descriptions": {},898 "like_count": 0,899 "views": 200,900 "category_id": 1,901 "featured_link": null,902 "has_accepted_answer": true,903 "posters": [904 {905 "extras": "latest single",906 "description": "Original Poster, Most Recent Poster, Accepted Answer",907 "user": {908 "id": 53378,909 "username": "foshea",910 "name": "Finn",911 "avatar_template": "/letter_avatar_proxy/v4/letter/f/a6a055/{size}.png",912 "trust_level": 1913 }914 }915 ]916 },917 {918 "fancy_title": "I meet 3 API-calls not listed in the NVIDIA-DOC",919 "id": 214297,920 "title": "I meet 3 API-calls not listed in the NVIDIA-DOC",921 "slug": "i-meet-3-api-calls-not-listed-in-the-nvidia-doc",922 "posts_count": 1,923 "reply_count": 0,924 "highest_post_number": 1,925 "image_url": null,926 "created_at": "2024-12-17T06:19:03.705Z",927 "last_posted_at": "2024-12-17T06:19:03.739Z",928 "bumped": true,929 "bumped_at": "2024-12-17T06:19:03.739Z",930 "archetype": "regular",931 "unseen": false,932 "pinned": false,933 "unpinned": null,934 "visible": true,935 "closed": false,936 "archived": false,937 "bookmarked": null,938 "liked": null,939 "tags_descriptions": {},940 "like_count": 0,941 "views": 82,942 "category_id": 1,943 "featured_link": null,944 "has_accepted_answer": false,945 "posters": [946 {947 "extras": "latest single",948 "description": "Original Poster, Most Recent Poster",949 "user": {950 "id": 80843,951 "username": "shysuen001",952 "name": "",953 "avatar_template": "/user_avatar/discuss.pytorch.org/shysuen001/{size}/73944_2.png",954 "trust_level": 1955 }956 }957 ]958 },959 {960 "fancy_title": ".item() blocks cpu thread until D2H operations in offload stream finish",961 "id": 218855,962 "title": ".item() blocks cpu thread until D2H operations in offload stream finish",963 "slug": "item-blocks-cpu-thread-until-d2h-operations-in-offload-stream-finish",964 "posts_count": 1,965 "reply_count": 0,966 "highest_post_number": 1,967 "image_url": "https://discuss.pytorch.org/uploads/default/optimized/3X/9/6/96c3048070329d6d38775dbb7b6e623ec88390eb_2_1024x573.png",968 "created_at": "2025-04-08T04:49:47.444Z",969 "last_posted_at": "2025-04-08T04:49:47.486Z",970 "bumped": true,971 "bumped_at": "2025-04-08T05:17:28.094Z",972 "archetype": "regular",973 "unseen": false,974 "pinned": false,975 "unpinned": null,976 "visible": true,977 "closed": false,978 "archived": false,979 "bookmarked": null,980 "liked": null,981 "tags_descriptions": {},982 "like_count": 0,983 "views": 21,984 "category_id": 1,985 "featured_link": null,986 "has_accepted_answer": false,987 "posters": [988 {989 "extras": "latest single",990 "description": "Original Poster, Most Recent Poster",991 "user": {992 "id": 83695,993 "username": "zhr2001",994 "name": "Zhr2001",995 "avatar_template": "/user_avatar/discuss.pytorch.org/zhr2001/{size}/76533_2.png",996 "trust_level": 1997 }998 }999 ]1000 }1001 ],1002 "tags_descriptions": {},1003 "fancy_title": "Is there an efficient way to convert a model with float32 params to float64?",1004 "id": 130767,1005 "title": "Is there an efficient way to convert a model with float32 params to float64?",1006 "posts_count": 5,1007 "created_at": "2021-08-31T16:27:23.043Z",1008 "views": 4781,1009 "reply_count": 3,1010 "like_count": 4,1011 "last_posted_at": "2021-08-31T17:06:30.076Z",1012 "visible": true,1013 "closed": false,1014 "archived": false,1015 "has_summary": false,1016 "archetype": "regular",1017 "slug": "is-there-an-efficient-way-to-convert-a-model-with-float32-params-to-float64",1018 "category_id": 1,1019 "word_count": 235,1020 "deleted_at": null,1021 "user_id": 34294,1022 "featured_link": null,1023 "pinned_globally": false,1024 "pinned_at": null,1025 "pinned_until": null,1026 "image_url": null,1027 "slow_mode_seconds": 0,1028 "draft": null,1029 "draft_key": "topic_130767",1030 "draft_sequence": null,1031 "unpinned": null,1032 "pinned": false,1033 "current_post_number": 1,1034 "highest_post_number": 5,1035 "deleted_by": null,1036 "actions_summary": [1037 {1038 "id": 4,1039 "count": 0,1040 "hidden": false,1041 "can_act": false1042 },1043 {1044 "id": 8,1045 "count": 0,1046 "hidden": false,1047 "can_act": false1048 },1049 {1050 "id": 10,1051 "count": 0,1052 "hidden": false,1053 "can_act": false1054 },1055 {1056 "id": 7,1057 "count": 0,1058 "hidden": false,1059 "can_act": false1060 }1061 ],1062 "chunk_size": 20,1063 "bookmarked": false,1064 "topic_timer": null,1065 "message_bus_last_id": 0,1066 "participant_count": 2,1067 "show_read_indicator": false,1068 "thumbnails": null,1069 "slow_mode_enabled_until": null,1070 "can_vote": false,1071 "vote_count": 0,1072 "user_voted": false,1073 "discourse_zendesk_plugin_zendesk_id": null,1074 "discourse_zendesk_plugin_zendesk_url": "https://your-url.zendesk.com/agent/tickets/",1075 "details": {1076 "can_edit": false,1077 "notification_level": 1,1078 "participants": [1079 {1080 "id": 34294,1081 "username": "AlphaBetaGamma96",1082 "name": "",1083 "avatar_template": "/letter_avatar_proxy/v4/letter/a/3da27b/{size}.png",1084 "post_count": 3,1085 "primary_group_name": null,1086 "flair_name": null,1087 "flair_url": null,1088 "flair_color": null,1089 "flair_bg_color": null,1090 "flair_group_id": null,1091 "trust_level": 21092 },1093 {1094 "id": 23886,1095 "username": "zetyquickly",1096 "name": "Emil Bogomolov",1097 "avatar_template": "/user_avatar/discuss.pytorch.org/zetyquickly/{size}/22489_2.png",1098 "post_count": 2,1099 "primary_group_name": null,1100 "flair_name": null,1101 "flair_url": null,1102 "flair_color": null,1103 "flair_bg_color": null,1104 "flair_group_id": null,1105 "trust_level": 21106 }1107 ],1108 "created_by": {1109 "id": 34294,1110 "username": "AlphaBetaGamma96",1111 "name": "",1112 "avatar_template": "/letter_avatar_proxy/v4/letter/a/3da27b/{size}.png"1113 },1114 "last_poster": {1115 "id": 34294,1116 "username": "AlphaBetaGamma96",1117 "name": "",1118 "avatar_template": "/letter_avatar_proxy/v4/letter/a/3da27b/{size}.png"1119 }1120 },1121 "bookmarks": []1122 },1123 {1124 "post_stream": {1125 "posts": [1126 {1127 "id": 294545,1128 "name": "",1129 "username": "iLikeBuns",1130 "avatar_template": "/user_avatar/discuss.pytorch.org/ilikebuns/{size}/40062_2.png",1131 "created_at": "2021-07-07T18:32:07.078Z",1132 "cooked": "<p>I’m currently trying to install pytorch 1.9.0 on windows 10 through conda on python3 with cuda 11.3</p>\n<p>Everything installed but at the end of installation I get these errors:</p>\n<p>Preparing transaction: done<br>\nVerifying transaction: done<br>\nExecuting transaction: done<br>\nERROR conda.core.link:_execute(699): An error occurred while installing package ‘conda-forge::cudatoolkit-11.1.1-heb2d755_7’.<br>\nRolling back transaction: done</p>\n<p>LinkError: post-link script failed for package conda-forge::cudatoolkit-11.1.1-heb2d755_7<br>\nlocation of failed script: C:\\Users\\iLikeBuns\\anaconda3\\Scripts.cudatoolkit-post-link.bat<br>\n==> script messages <==<br>\n<br>\n==> script output <==<br>\nstdout:<br>\nstderr: Access is denied.</p>\n<p>return code: 1</p>\n<p>()</p>\n<p>I’ve been googling but I couldn’t find issues similar to mine.</p>",1133 "post_number": 1,1134 "post_type": 1,1135 "posts_count": 5,1136 "updated_at": "2021-07-07T18:32:07.078Z",1137 "reply_count": 0,1138 "reply_to_post_number": null,1139 "quote_count": 0,1140 "incoming_link_count": 3604,1141 "reads": 21,1142 "readers_count": 20,1143 "score": 18024.2,1144 "yours": false,1145 "topic_id": 126117,1146 "topic_slug": "error-conda-core-link-execute-699",1147 "display_username": "",1148 "primary_group_name": null,1149 "flair_name": null,1150 "flair_url": null,1151 "flair_bg_color": null,1152 "flair_color": null,1153 "flair_group_id": null,1154 "badges_granted": [],1155 "version": 1,1156 "can_edit": false,1157 "can_delete": false,1158 "can_recover": false,1159 "can_see_hidden_post": false,1160 "can_wiki": false,1161 "read": true,1162 "user_title": null,1163 "bookmarked": false,1164 "actions_summary": [],1165 "moderator": false,1166 "admin": false,1167 "staff": false,1168 "user_id": 46997,1169 "hidden": false,1170 "trust_level": 0,1171 "deleted_at": null,1172 "user_deleted": false,1173 "edit_reason": null,1174 "can_view_edit_history": true,1175 "wiki": false,1176 "post_url": "/t/error-conda-core-link-execute-699/126117/1",1177 "can_accept_answer": false,1178 "can_unaccept_answer": false,1179 "accepted_answer": false,1180 "topic_accepted_answer": null,1181 "can_vote": false1182 },1183 {1184 "id": 294859,1185 "name": "진환 김",1186 "username": "111543",1187 "avatar_template": "/user_avatar/discuss.pytorch.org/111543/{size}/40128_2.png",1188 "created_at": "2021-07-09T06:32:30.109Z",1189 "cooked": "<p>Did you resolve it? I have a same problem.</p>",1190 "post_number": 2,1191 "post_type": 1,1192 "posts_count": 5,1193 "updated_at": "2021-07-09T06:32:30.109Z",1194 "reply_count": 0,1195 "reply_to_post_number": null,1196 "quote_count": 0,1197 "incoming_link_count": 32,1198 "reads": 17,1199 "readers_count": 16,1200 "score": 163.4,