Anurag1734/cuda-error-resolution-analysis
07
1[2 {3 "post_stream": {4 "posts": [5 {6 "id": 293419,7 "name": "",8 "username": "GMSL",9 "avatar_template": "/letter_avatar_proxy/v4/letter/g/e47c2d/{size}.png",10 "created_at": "2021-07-01T13:04:18.781Z",11 "cooked": "<p>I’ve tried the <a href=\"https://pytorch.org/tutorials/beginner/basics/quickstart_tutorial.html\" rel=\"noopener nofollow ugc\">quickstart tutorial</a> on two machines - one without a CUDA-compatible GPU running PyTorch 1.9.0-CPU, and the other with CUDA-compatible GPU running PyTorch 1.9.0+cu111. For the first one (with CPU), the tutorial works fine, however with the second one (with CUDA) it fails in the first section.</p>\n<p>I copied and pasted the code in directly from the tutorial:</p>\n<pre><code class=\"lang-auto\">import torch\nfrom torch import nn\nfrom torch.utils.data import DataLoader\nfrom torchvision import datasets\nfrom torchvision.transforms import ToTensor, Lambda, Compose\nimport matplotlib.pyplot as plt\n\n# Download training data from open datasets.\ntraining_data = datasets.FashionMNIST(\n root=\"data\",\n train=True,\n download=True,\n transform=ToTensor(),\n)\n\n# Download test data from open datasets.\ntest_data = datasets.FashionMNIST(\n root=\"data\",\n train=False,\n download=True,\n transform=ToTensor(),\n)\n\nbatch_size = 64\n\n# Create data loaders.\ntrain_dataloader = DataLoader(training_data, batch_size=batch_size)\ntest_dataloader = DataLoader(test_data, batch_size=batch_size)\n\nfor X, y in test_dataloader:\n print(\"Shape of X [N, C, H, W]: \", X.shape)\n print(\"Shape of y: \", y.shape, y.dtype)\n break\n</code></pre>\n<p>Running this gives me the error:</p>\n<pre><code class=\"lang-auto\">TypeError: __array__() takes 1 positional argument but 2 were given\n</code></pre>\n<p>It’s the for loop that causes the error, it runs fine if that for loop is commented out. Looking on this forum and google, it seems a common reason is ommitting the <strong>init</strong> method from a function, but obviously I haven’t defined any functions yet in this tutorial.</p>\n<p>Thanks for any help.</p>",12 "post_number": 1,13 "post_type": 1,14 "posts_count": 5,15 "updated_at": "2021-07-01T13:04:18.781Z",16 "reply_count": 0,17 "reply_to_post_number": null,18 "quote_count": 0,19 "incoming_link_count": 1435,20 "reads": 25,21 "readers_count": 24,22 "score": 7180.0,23 "yours": false,24 "topic_id": 125550,25 "topic_slug": "quickstart-tutorial-array-takes-1-positional-argument-but-2-were-given",26 "display_username": "",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/basics/quickstart_tutorial.html",43 "internal": false,44 "reflection": false,45 "title": "Quickstart — PyTorch Tutorials 1.9.0+cu102 documentation",46 "clicks": 647 }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": 46786,57 "hidden": false,58 "trust_level": 0,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/quickstart-tutorial-array-takes-1-positional-argument-but-2-were-given/125550/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": 293518,73 "name": "",74 "username": "ptrblck",75 "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",76 "created_at": "2021-07-02T02:20:30.097Z",77 "cooked": "<p>The issue might be related to <code>PIL==8.3.0</code> as described <a href=\"https://github.com/pytorch/pytorch/issues/61125\">here</a> and <a class=\"mention\" href=\"/u/tom\">@tom</a> already provided a fix <a href=\"https://github.com/python-pillow/Pillow/pull/5572\">here</a>.<br>\nIf you are also using <code>PIL==8.3.0</code>, downgrade it to <code>8.2.0</code> for now. If that’s not the case, please let us know and we’ll take another look into your issue.</p>",78 "post_number": 2,79 "post_type": 1,80 "posts_count": 5,81 "updated_at": "2021-07-02T11:19:00.213Z",82 "reply_count": 1,83 "reply_to_post_number": null,84 "quote_count": 0,85 "incoming_link_count": 52,86 "reads": 25,87 "readers_count": 24,88 "score": 315.0,89 "yours": false,90 "topic_id": 125550,91 "topic_slug": "quickstart-tutorial-array-takes-1-positional-argument-but-2-were-given",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 "link_counts": [107 {108 "url": "https://github.com/python-pillow/Pillow/pull/5572",109 "internal": false,110 "reflection": false,111 "clicks": 146112 },113 {114 "url": "https://github.com/pytorch/pytorch/issues/61125",115 "internal": false,116 "reflection": false,117 "title": "[Bug] TypeError: __array__() takes 1 positional argument but 2 were given · Issue #61125 · pytorch/pytorch · GitHub",118 "clicks": 115119 },120 {121 "url": "https://discuss.pytorch.org/t/pytorch-dataloader-output-is-not-iterable/125820/5",122 "internal": true,123 "reflection": true,124 "title": "Pytorch DataLoader output is not iterable",125 "clicks": 3126 },127 {128 "url": "https://discuss.pytorch.org/t/torchvision-transforms-functional-to-tensor-typeerror-array-takes-1-positional-argument-but-2-were-given-error/125630/2",129 "internal": true,130 "reflection": true,131 "title": "Torchvision.transforms.functional.to_tensor: TypeError: __array__() takes 1 positional argument but 2 were given error:",132 "clicks": 2133 },134 {135 "url": "https://discuss.pytorch.org/t/gaussianblur-transform-causing-error/125652/2",136 "internal": true,137 "reflection": true,138 "title": "GaussianBlur transform causing error",139 "clicks": 1140 }141 ],142 "read": true,143 "user_title": "",144 "bookmarked": false,145 "actions_summary": [146 {147 "id": 2,148 "count": 3149 }150 ],151 "moderator": true,152 "admin": true,153 "staff": true,154 "user_id": 3534,155 "hidden": false,156 "trust_level": 2,157 "deleted_at": null,158 "user_deleted": false,159 "edit_reason": null,160 "can_view_edit_history": true,161 "wiki": false,162 "post_url": "/t/quickstart-tutorial-array-takes-1-positional-argument-but-2-were-given/125550/2",163 "can_accept_answer": false,164 "can_unaccept_answer": false,165 "accepted_answer": true,166 "topic_accepted_answer": true167 },168 {169 "id": 293615,170 "name": "Aimlessboy Yuan",171 "username": "Aimlessboy_Yuan",172 "avatar_template": "/user_avatar/discuss.pytorch.org/aimlessboy_yuan/{size}/29916_2.png",173 "created_at": "2021-07-02T11:06:22.201Z",174 "cooked": "<p>Thanks,this solution does work! <img src=\"https://discuss.pytorch.org/images/emoji/apple/+1.png?v=9\" title=\":+1:\" class=\"emoji\" alt=\":+1:\"> <img src=\"https://discuss.pytorch.org/images/emoji/apple/+1.png?v=9\" title=\":+1:\" class=\"emoji\" alt=\":+1:\"> <img src=\"https://discuss.pytorch.org/images/emoji/apple/+1.png?v=9\" title=\":+1:\" class=\"emoji\" alt=\":+1:\"></p>",175 "post_number": 3,176 "post_type": 1,177 "posts_count": 5,178 "updated_at": "2021-07-02T11:06:22.201Z",179 "reply_count": 0,180 "reply_to_post_number": 2,181 "quote_count": 0,182 "incoming_link_count": 5,183 "reads": 24,184 "readers_count": 23,185 "score": 29.8,186 "yours": false,187 "topic_id": 125550,188 "topic_slug": "quickstart-tutorial-array-takes-1-positional-argument-but-2-were-given",189 "display_username": "Aimlessboy Yuan",190 "primary_group_name": null,191 "flair_name": null,192 "flair_url": null,193 "flair_bg_color": null,194 "flair_color": null,195 "flair_group_id": null,196 "badges_granted": [],197 "version": 1,198 "can_edit": false,199 "can_delete": false,200 "can_recover": false,201 "can_see_hidden_post": false,202 "can_wiki": false,203 "read": true,204 "user_title": null,205 "reply_to_user": {206 "id": 3534,207 "username": "ptrblck",208 "name": "",209 "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png"210 },211 "bookmarked": false,212 "actions_summary": [],213 "moderator": false,214 "admin": false,215 "staff": false,216 "user_id": 46816,217 "hidden": false,218 "trust_level": 1,219 "deleted_at": null,220 "user_deleted": false,221 "edit_reason": null,222 "can_view_edit_history": true,223 "wiki": false,224 "post_url": "/t/quickstart-tutorial-array-takes-1-positional-argument-but-2-were-given/125550/3",225 "can_accept_answer": false,226 "can_unaccept_answer": false,227 "accepted_answer": false,228 "topic_accepted_answer": true229 },230 {231 "id": 293616,232 "name": "",233 "username": "GMSL",234 "avatar_template": "/letter_avatar_proxy/v4/letter/g/e47c2d/{size}.png",235 "created_at": "2021-07-02T11:18:56.001Z",236 "cooked": "<p>This worked thank you. Just to confirm, it was <code>pillow</code> that I had to downgrade to 8.2.0, which is a fork of <code>PIL</code>.</p>",237 "post_number": 4,238 "post_type": 1,239 "posts_count": 5,240 "updated_at": "2021-07-02T11:18:56.001Z",241 "reply_count": 0,242 "reply_to_post_number": null,243 "quote_count": 0,244 "incoming_link_count": 7,245 "reads": 23,246 "readers_count": 22,247 "score": 39.6,248 "yours": false,249 "topic_id": 125550,250 "topic_slug": "quickstart-tutorial-array-takes-1-positional-argument-but-2-were-given",251 "display_username": "",252 "primary_group_name": null,253 "flair_name": null,254 "flair_url": null,255 "flair_bg_color": null,256 "flair_color": null,257 "flair_group_id": null,258 "badges_granted": [],259 "version": 1,260 "can_edit": false,261 "can_delete": false,262 "can_recover": false,263 "can_see_hidden_post": false,264 "can_wiki": false,265 "read": true,266 "user_title": null,267 "bookmarked": false,268 "actions_summary": [],269 "moderator": false,270 "admin": false,271 "staff": false,272 "user_id": 46786,273 "hidden": false,274 "trust_level": 0,275 "deleted_at": null,276 "user_deleted": false,277 "edit_reason": null,278 "can_view_edit_history": true,279 "wiki": false,280 "post_url": "/t/quickstart-tutorial-array-takes-1-positional-argument-but-2-were-given/125550/4",281 "can_accept_answer": false,282 "can_unaccept_answer": false,283 "accepted_answer": false,284 "topic_accepted_answer": true285 },286 {287 "id": 311844,288 "name": "HackerCop",289 "username": "HackerCop",290 "avatar_template": "/user_avatar/discuss.pytorch.org/hackercop/{size}/43029_2.png",291 "created_at": "2021-10-15T15:31:53.883Z",292 "cooked": "<p>This worked thanks pip uninstall pillow and pip install pillow==8.2.0 solved the problem</p>",293 "post_number": 5,294 "post_type": 1,295 "posts_count": 5,296 "updated_at": "2021-10-15T15:31:53.883Z",297 "reply_count": 0,298 "reply_to_post_number": null,299 "quote_count": 0,300 "incoming_link_count": 3,301 "reads": 10,302 "readers_count": 9,303 "score": 17.0,304 "yours": false,305 "topic_id": 125550,306 "topic_slug": "quickstart-tutorial-array-takes-1-positional-argument-but-2-were-given",307 "display_username": "HackerCop",308 "primary_group_name": null,309 "flair_name": null,310 "flair_url": null,311 "flair_bg_color": null,312 "flair_color": null,313 "flair_group_id": null,314 "badges_granted": [],315 "version": 1,316 "can_edit": false,317 "can_delete": false,318 "can_recover": false,319 "can_see_hidden_post": false,320 "can_wiki": false,321 "read": true,322 "user_title": null,323 "bookmarked": false,324 "actions_summary": [],325 "moderator": false,326 "admin": false,327 "staff": false,328 "user_id": 49839,329 "hidden": false,330 "trust_level": 1,331 "deleted_at": null,332 "user_deleted": false,333 "edit_reason": null,334 "can_view_edit_history": true,335 "wiki": false,336 "post_url": "/t/quickstart-tutorial-array-takes-1-positional-argument-but-2-were-given/125550/5",337 "can_accept_answer": false,338 "can_unaccept_answer": false,339 "accepted_answer": false,340 "topic_accepted_answer": true341 }342 ],343 "stream": [344 293419,345 293518,346 293615,347 293616,348 311844349 ]350 },351 "timeline_lookup": [352 [353 1,354 1577355 ],356 [357 3,358 1576359 ],360 [361 5,362 1471363 ]364 ],365 "suggested_topics": [366 {367 "fancy_title": "Unrecognized CMAKE_SYSTEM_NAME = Windows while building Pytorch in Windows",368 "id": 215713,369 "title": "Unrecognized CMAKE_SYSTEM_NAME = Windows while building Pytorch in Windows",370 "slug": "unrecognized-cmake-system-name-windows-while-building-pytorch-in-windows",371 "posts_count": 1,372 "reply_count": 0,373 "highest_post_number": 1,374 "image_url": null,375 "created_at": "2025-01-22T11:47:13.573Z",376 "last_posted_at": "2025-01-22T11:47:13.618Z",377 "bumped": true,378 "bumped_at": "2025-01-22T11:47:13.618Z",379 "archetype": "regular",380 "unseen": false,381 "pinned": false,382 "unpinned": null,383 "visible": true,384 "closed": false,385 "archived": false,386 "bookmarked": null,387 "liked": null,388 "tags_descriptions": {},389 "like_count": 0,390 "views": 91,391 "category_id": 26,392 "featured_link": null,393 "has_accepted_answer": false,394 "posters": [395 {396 "extras": "latest single",397 "description": "Original Poster, Most Recent Poster",398 "user": {399 "id": 81932,400 "username": "Jenet",401 "name": "",402 "avatar_template": "/letter_avatar_proxy/v4/letter/j/85e7bf/{size}.png",403 "trust_level": 1404 }405 }406 ]407 },408 {409 "fancy_title": "How to use torch with CUDA 12.9",410 "id": 220827,411 "title": "How to use torch with CUDA 12.9",412 "slug": "how-to-use-torch-with-cuda-12-9",413 "posts_count": 5,414 "reply_count": 2,415 "highest_post_number": 7,416 "image_url": null,417 "created_at": "2025-06-15T07:08:55.857Z",418 "last_posted_at": "2025-07-18T22:41:59.447Z",419 "bumped": true,420 "bumped_at": "2025-07-18T22:41:59.447Z",421 "archetype": "regular",422 "unseen": false,423 "pinned": false,424 "unpinned": null,425 "visible": true,426 "closed": false,427 "archived": false,428 "bookmarked": null,429 "liked": null,430 "tags_descriptions": {},431 "like_count": 3,432 "views": 7526,433 "category_id": 26,434 "featured_link": null,435 "has_accepted_answer": false,436 "posters": [437 {438 "extras": null,439 "description": "Original Poster",440 "user": {441 "id": 84711,442 "username": "Ahmed_Mhmouad",443 "name": "Ahmed Mhmouad",444 "avatar_template": "/user_avatar/discuss.pytorch.org/ahmed_mhmouad/{size}/77381_2.png",445 "trust_level": 0446 }447 },448 {449 "extras": null,450 "description": "Frequent Poster",451 "user": {452 "id": 3534,453 "username": "ptrblck",454 "name": "",455 "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",456 "admin": true,457 "moderator": true,458 "trust_level": 2459 }460 },461 {462 "extras": null,463 "description": "Frequent Poster",464 "user": {465 "id": 85105,466 "username": "yogesh_jog",467 "name": "yogesh jog",468 "avatar_template": "/user_avatar/discuss.pytorch.org/yogesh_jog/{size}/77689_2.png",469 "trust_level": 0470 }471 },472 {473 "extras": "latest",474 "description": "Most Recent Poster",475 "user": {476 "id": 85150,477 "username": "HipHop_Delhi",478 "name": "HipHop Delhi",479 "avatar_template": "/user_avatar/discuss.pytorch.org/hiphop_delhi/{size}/77724_2.png",480 "trust_level": 0481 }482 }483 ]484 },485 {486 "fancy_title": "Is cuda installed automatically when following pytorch instlalation directions?",487 "id": 215493,488 "title": "Is cuda installed automatically when following pytorch instlalation directions?",489 "slug": "is-cuda-installed-automatically-when-following-pytorch-instlalation-directions",490 "posts_count": 4,491 "reply_count": 2,492 "highest_post_number": 4,493 "image_url": null,494 "created_at": "2025-01-16T23:05:37.427Z",495 "last_posted_at": "2025-05-04T06:21:38.291Z",496 "bumped": true,497 "bumped_at": "2025-05-04T06:21:38.291Z",498 "archetype": "regular",499 "unseen": false,500 "pinned": false,501 "unpinned": null,502 "visible": true,503 "closed": false,504 "archived": false,505 "bookmarked": null,506 "liked": null,507 "tags_descriptions": {},508 "like_count": 1,509 "views": 716,510 "category_id": 26,511 "featured_link": null,512 "has_accepted_answer": true,513 "posters": [514 {515 "extras": null,516 "description": "Original Poster",517 "user": {518 "id": 82129,519 "username": "Almenon",520 "name": "Almenon",521 "avatar_template": "/user_avatar/discuss.pytorch.org/almenon/{size}/75137_2.png",522 "trust_level": 0523 }524 },525 {526 "extras": null,527 "description": "Frequent Poster, Accepted Answer",528 "user": {529 "id": 3534,530 "username": "ptrblck",531 "name": "",532 "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",533 "admin": true,534 "moderator": true,535 "trust_level": 2536 }537 },538 {539 "extras": "latest",540 "description": "Most Recent Poster",541 "user": {542 "id": 84136,543 "username": "Guillermo_Barbadillo",544 "name": "Guillermo Barbadillo Villanueva",545 "avatar_template": "/user_avatar/discuss.pytorch.org/guillermo_barbadillo/{size}/76900_2.png",546 "trust_level": 0547 }548 }549 ]550 },551 {552 "fancy_title": "Wonders of how to use flex attention",553 "id": 212342,554 "title": "Wonders of how to use flex attention",555 "slug": "wonders-of-how-to-use-flex-attention",556 "posts_count": 2,557 "reply_count": 0,558 "highest_post_number": 2,559 "image_url": "https://discuss.pytorch.org/uploads/default/optimized/3X/6/b/6b2a97aae156c6bfab57a083e5d2d02091ec4395_2_1024x396.jpeg",560 "created_at": "2024-10-31T03:23:33.770Z",561 "last_posted_at": "2025-02-05T00:01:52.209Z",562 "bumped": true,563 "bumped_at": "2025-02-05T00:01:52.209Z",564 "archetype": "regular",565 "unseen": false,566 "pinned": false,567 "unpinned": null,568 "visible": true,569 "closed": false,570 "archived": false,571 "bookmarked": null,572 "liked": null,573 "tags_descriptions": {},574 "like_count": 0,575 "views": 365,576 "category_id": 26,577 "featured_link": null,578 "has_accepted_answer": false,579 "posters": [580 {581 "extras": null,582 "description": "Original Poster",583 "user": {584 "id": 80601,585 "username": "Haoran_Cheng",586 "name": "Haoran Cheng",587 "avatar_template": "/user_avatar/discuss.pytorch.org/haoran_cheng/{size}/73350_2.png",588 "trust_level": 0589 }590 },591 {592 "extras": "latest",593 "description": "Most Recent Poster",594 "user": {595 "id": 36843,596 "username": "ss42",597 "name": "ss42",598 "avatar_template": "/letter_avatar_proxy/v4/letter/s/8491ac/{size}.png",599 "trust_level": 1600 }601 }602 ]603 },604 {605 "fancy_title": "I successfully built PyTorch from source on Windows 11 using CUDA 12.9 for the RTX 5070. Still working through a small runtime issue, but the full build process is documented here on GitHub: [https://github.com/DMorford/TorchinDesiree]",606 "id": 221817,607 "title": "I successfully built PyTorch from source on Windows 11 using CUDA 12.9 for the RTX 5070. Still working through a small runtime issue, but the full build process is documented here on GitHub: [https://github.com/DMorford/TorchinDesiree]",608 "slug": "i-successfully-built-pytorch-from-source-on-windows-11-using-cuda-12-9-for-the-rtx-5070-still-working-through-a-small-runtime-issue-but-the-full-build-process-is-documented-here-on-github-https-github-com-dmorford-torchindesiree",609 "posts_count": 2,610 "reply_count": 0,611 "highest_post_number": 2,612 "image_url": null,613 "created_at": "2025-07-25T20:54:25.321Z",614 "last_posted_at": "2025-08-13T18:24:47.987Z",615 "bumped": true,616 "bumped_at": "2025-08-13T18:29:37.737Z",617 "archetype": "regular",618 "unseen": false,619 "pinned": false,620 "unpinned": null,621 "visible": true,622 "closed": false,623 "archived": false,624 "bookmarked": null,625 "liked": null,626 "tags_descriptions": {},627 "like_count": 0,628 "views": 190,629 "category_id": 26,630 "featured_link": null,631 "has_accepted_answer": false,632 "posters": [633 {634 "extras": "latest single",635 "description": "Original Poster, Most Recent Poster",636 "user": {637 "id": 85230,638 "username": "EasydoesitDave",639 "name": "Dave",640 "avatar_template": "/user_avatar/discuss.pytorch.org/easydoesitdave/{size}/77780_2.png",641 "trust_level": 0642 }643 }644 ]645 }646 ],647 "tags_descriptions": {},648 "fancy_title": "Quickstart tutorial: __array__() takes 1 positional argument but 2 were given",649 "id": 125550,650 "title": "Quickstart tutorial: __array__() takes 1 positional argument but 2 were given",651 "posts_count": 5,652 "created_at": "2021-07-01T13:04:18.675Z",653 "views": 3982,654 "reply_count": 1,655 "like_count": 3,656 "last_posted_at": "2021-10-15T15:31:53.883Z",657 "visible": true,658 "closed": false,659 "archived": false,660 "has_summary": false,661 "archetype": "regular",662 "slug": "quickstart-tutorial-array-takes-1-positional-argument-but-2-were-given",663 "category_id": 26,664 "word_count": 367,665 "deleted_at": null,666 "user_id": 46786,667 "featured_link": null,668 "pinned_globally": false,669 "pinned_at": null,670 "pinned_until": null,671 "image_url": null,672 "slow_mode_seconds": 0,673 "draft": null,674 "draft_key": "topic_125550",675 "draft_sequence": null,676 "unpinned": null,677 "pinned": false,678 "current_post_number": 1,679 "highest_post_number": 5,680 "deleted_by": null,681 "actions_summary": [682 {683 "id": 4,684 "count": 0,685 "hidden": false,686 "can_act": false687 },688 {689 "id": 8,690 "count": 0,691 "hidden": false,692 "can_act": false693 },694 {695 "id": 10,696 "count": 0,697 "hidden": false,698 "can_act": false699 },700 {701 "id": 7,702 "count": 0,703 "hidden": false,704 "can_act": false705 }706 ],707 "chunk_size": 20,708 "bookmarked": false,709 "topic_timer": null,710 "message_bus_last_id": 0,711 "participant_count": 4,712 "show_read_indicator": false,713 "thumbnails": null,714 "slow_mode_enabled_until": null,715 "accepted_answer": {716 "post_number": 2,717 "username": "ptrblck",718 "name": "",719 "excerpt": "The issue might be related to PIL==8.3.0 as described <a href=\"https://github.com/pytorch/pytorch/issues/61125\">here</a> and <a class=\"mention\" href=\"/u/tom\">@tom</a> already provided a fix <a href=\"https://github.com/python-pillow/Pillow/pull/5572\">here</a>. \nIf you are also using PIL==8.3.0, downgrade it to 8.2.0 for now. If that’s not the case, please let us know and we’ll take another look into your issue."720 },721 "can_vote": false,722 "vote_count": 0,723 "user_voted": false,724 "discourse_zendesk_plugin_zendesk_id": null,725 "discourse_zendesk_plugin_zendesk_url": "https://your-url.zendesk.com/agent/tickets/",726 "details": {727 "can_edit": false,728 "notification_level": 1,729 "participants": [730 {731 "id": 46786,732 "username": "GMSL",733 "name": "",734 "avatar_template": "/letter_avatar_proxy/v4/letter/g/e47c2d/{size}.png",735 "post_count": 2,736 "primary_group_name": null,737 "flair_name": null,738 "flair_url": null,739 "flair_color": null,740 "flair_bg_color": null,741 "flair_group_id": null,742 "trust_level": 0743 },744 {745 "id": 3534,746 "username": "ptrblck",747 "name": "",748 "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",749 "post_count": 1,750 "primary_group_name": null,751 "flair_name": null,752 "flair_url": null,753 "flair_color": null,754 "flair_bg_color": null,755 "flair_group_id": null,756 "admin": true,757 "moderator": true,758 "trust_level": 2759 },760 {761 "id": 46816,762 "username": "Aimlessboy_Yuan",763 "name": "Aimlessboy Yuan",764 "avatar_template": "/user_avatar/discuss.pytorch.org/aimlessboy_yuan/{size}/29916_2.png",765 "post_count": 1,766 "primary_group_name": null,767 "flair_name": null,768 "flair_url": null,769 "flair_color": null,770 "flair_bg_color": null,771 "flair_group_id": null,772 "trust_level": 1773 },774 {775 "id": 49839,776 "username": "HackerCop",777 "name": "HackerCop",778 "avatar_template": "/user_avatar/discuss.pytorch.org/hackercop/{size}/43029_2.png",779 "post_count": 1,780 "primary_group_name": null,781 "flair_name": null,782 "flair_url": null,783 "flair_color": null,784 "flair_bg_color": null,785 "flair_group_id": null,786 "trust_level": 1787 }788 ],789 "created_by": {790 "id": 46786,791 "username": "GMSL",792 "name": "",793 "avatar_template": "/letter_avatar_proxy/v4/letter/g/e47c2d/{size}.png"794 },795 "last_poster": {796 "id": 49839,797 "username": "HackerCop",798 "name": "HackerCop",799 "avatar_template": "/user_avatar/discuss.pytorch.org/hackercop/{size}/43029_2.png"800 },801 "links": [802 {803 "url": "https://github.com/python-pillow/Pillow/pull/5572",804 "title": null,805 "internal": false,806 "attachment": false,807 "reflection": false,808 "clicks": 146,809 "user_id": 3534,810 "domain": "github.com",811 "root_domain": "github.com"812 },813 {814 "url": "https://github.com/pytorch/pytorch/issues/61125",815 "title": "[Bug] TypeError: __array__() takes 1 positional argument but 2 were given · Issue #61125 · pytorch/pytorch · GitHub",816 "internal": false,817 "attachment": false,818 "reflection": false,819 "clicks": 115,820 "user_id": 3534,821 "domain": "github.com",822 "root_domain": "github.com"823 },824 {825 "url": "https://pytorch.org/tutorials/beginner/basics/quickstart_tutorial.html",826 "title": "Quickstart — PyTorch Tutorials 1.9.0+cu102 documentation",827 "internal": false,828 "attachment": false,829 "reflection": false,830 "clicks": 6,831 "user_id": 46786,832 "domain": "pytorch.org",833 "root_domain": "pytorch.org"834 },835 {836 "url": "https://discuss.pytorch.org/t/pytorch-dataloader-output-is-not-iterable/125820/5",837 "title": "Pytorch DataLoader output is not iterable",838 "internal": true,839 "attachment": false,840 "reflection": true,841 "clicks": 3,842 "user_id": 3534,843 "domain": "discuss.pytorch.org",844 "root_domain": "pytorch.org"845 },846 {847 "url": "https://discuss.pytorch.org/t/torchvision-transforms-functional-to-tensor-typeerror-array-takes-1-positional-argument-but-2-were-given-error/125630/2",848 "title": "Torchvision.transforms.functional.to_tensor: TypeError: __array__() takes 1 positional argument but 2 were given error:",849 "internal": true,850 "attachment": false,851 "reflection": true,852 "clicks": 2,853 "user_id": 3534,854 "domain": "discuss.pytorch.org",855 "root_domain": "pytorch.org"856 },857 {858 "url": "https://discuss.pytorch.org/t/gaussianblur-transform-causing-error/125652/2",859 "title": "GaussianBlur transform causing error",860 "internal": true,861 "attachment": false,862 "reflection": true,863 "clicks": 1,864 "user_id": 3534,865 "domain": "discuss.pytorch.org",866 "root_domain": "pytorch.org"867 }868 ]869 },870 "bookmarks": []871 },872 {873 "post_stream": {874 "posts": [875 {876 "id": 311825,877 "name": "Anders",878 "username": "Anders_G",879 "avatar_template": "/user_avatar/discuss.pytorch.org/anders_g/{size}/44783_2.png",880 "created_at": "2021-10-15T12:55:52.968Z",881 "cooked": "<p>Is it possible to take of over the storage of the data used in the back propagation? For instance if I have little memory on the GPU and want to store it on CPU RAM and then move it back when it is needed in during back propagation.</p>",882 "post_number": 1,883 "post_type": 1,884 "posts_count": 3,885 "updated_at": "2021-10-15T12:55:52.968Z",886 "reply_count": 0,887 "reply_to_post_number": null,888 "quote_count": 0,889 "incoming_link_count": 17,890 "reads": 6,891 "readers_count": 5,892 "score": 86.2,893 "yours": false,894 "topic_id": 134312,895 "topic_slug": "is-it-possible-to-hijack-the-storage-of-data-needed-in-backward-pass",896 "display_username": "Anders",897 "primary_group_name": null,898 "flair_name": null,899 "flair_url": null,900 "flair_bg_color": null,901 "flair_color": null,902 "flair_group_id": null,903 "badges_granted": [],904 "version": 1,905 "can_edit": false,906 "can_delete": false,907 "can_recover": false,908 "can_see_hidden_post": false,909 "can_wiki": false,910 "read": true,911 "user_title": null,912 "bookmarked": false,913 "actions_summary": [],914 "moderator": false,915 "admin": false,916 "staff": false,917 "user_id": 24307,918 "hidden": false,919 "trust_level": 1,920 "deleted_at": null,921 "user_deleted": false,922 "edit_reason": null,923 "can_view_edit_history": true,924 "wiki": false,925 "post_url": "/t/is-it-possible-to-hijack-the-storage-of-data-needed-in-backward-pass/134312/1",926 "can_accept_answer": false,927 "can_unaccept_answer": false,928 "accepted_answer": false,929 "topic_accepted_answer": null,930 "can_vote": false931 },932 {933 "id": 311831,934 "name": "Alban D",935 "username": "albanD",936 "avatar_template": "/user_avatar/discuss.pytorch.org/alband/{size}/215_2.png",937 "created_at": "2021-10-15T13:44:18.019Z",938 "cooked": "<p>Hi,</p>\n<p>If you’re using nightly or in the upcoming 1.10, you will be able to register such hooks directly: <a href=\"https://pytorch.org/docs/master/notes/autograd.html#hooks-for-saved-tensors\" class=\"inline-onebox\">Autograd mechanics — PyTorch master documentation</a></p>\n<p>And if you just want to move everything from GPU to CPU, we have a builtin here: <a href=\"https://pytorch.org/docs/master/autograd.html?highlight=cpu#torch.autograd.graph.save_on_cpu\" class=\"inline-onebox\">Automatic differentiation package - torch.autograd — PyTorch master documentation</a></p>",939 "post_number": 2,940 "post_type": 1,941 "posts_count": 3,942 "updated_at": "2021-10-15T13:44:18.019Z",943 "reply_count": 1,944 "reply_to_post_number": null,945 "quote_count": 0,946 "incoming_link_count": 0,947 "reads": 6,948 "readers_count": 5,949 "score": 21.2,950 "yours": false,951 "topic_id": 134312,952 "topic_slug": "is-it-possible-to-hijack-the-storage-of-data-needed-in-backward-pass",953 "display_username": "Alban D",954 "primary_group_name": null,955 "flair_name": null,956 "flair_url": null,957 "flair_bg_color": null,958 "flair_color": null,959 "flair_group_id": null,960 "badges_granted": [],961 "version": 1,962 "can_edit": false,963 "can_delete": false,964 "can_recover": false,965 "can_see_hidden_post": false,966 "can_wiki": false,967 "link_counts": [968 {969 "url": "https://pytorch.org/docs/master/notes/autograd.html#hooks-for-saved-tensors",970 "internal": false,971 "reflection": false,972 "title": "Autograd mechanics — PyTorch master documentation",973 "clicks": 4974 },975 {976 "url": "https://pytorch.org/docs/master/autograd.html?highlight=cpu#torch.autograd.graph.save_on_cpu",977 "internal": false,978 "reflection": false,979 "title": "Automatic differentiation package - torch.autograd — PyTorch master documentation",980 "clicks": 1981 }982 ],983 "read": true,984 "user_title": "",985 "bookmarked": false,986 "actions_summary": [987 {988 "id": 2,989 "count": 1990 }991 ],992 "moderator": true,993 "admin": true,994 "staff": true,995 "user_id": 211,996 "hidden": false,997 "trust_level": 4,998 "deleted_at": null,999 "user_deleted": false,1000 "edit_reason": null,1001 "can_view_edit_history": true,1002 "wiki": false,1003 "post_url": "/t/is-it-possible-to-hijack-the-storage-of-data-needed-in-backward-pass/134312/2",1004 "can_accept_answer": false,1005 "can_unaccept_answer": false,1006 "accepted_answer": false,1007 "topic_accepted_answer": null1008 },1009 {1010 "id": 311841,1011 "name": "Anders",1012 "username": "Anders_G",1013 "avatar_template": "/user_avatar/discuss.pytorch.org/anders_g/{size}/44783_2.png",1014 "created_at": "2021-10-15T15:19:22.319Z",1015 "cooked": "<p>Thank you it was exactly what I was looking for!</p>",1016 "post_number": 3,1017 "post_type": 1,1018 "posts_count": 3,1019 "updated_at": "2021-10-15T15:19:22.319Z",1020 "reply_count": 0,1021 "reply_to_post_number": 2,1022 "quote_count": 0,1023 "incoming_link_count": 0,1024 "reads": 6,1025 "readers_count": 5,1026 "score": 1.2,1027 "yours": false,1028 "topic_id": 134312,1029 "topic_slug": "is-it-possible-to-hijack-the-storage-of-data-needed-in-backward-pass",1030 "display_username": "Anders",1031 "primary_group_name": null,1032 "flair_name": null,1033 "flair_url": null,1034 "flair_bg_color": null,1035 "flair_color": null,1036 "flair_group_id": null,1037 "badges_granted": [],1038 "version": 1,1039 "can_edit": false,1040 "can_delete": false,1041 "can_recover": false,1042 "can_see_hidden_post": false,1043 "can_wiki": false,1044 "read": true,1045 "user_title": null,1046 "reply_to_user": {1047 "id": 211,1048 "username": "albanD",1049 "name": "Alban D",1050 "avatar_template": "/user_avatar/discuss.pytorch.org/alband/{size}/215_2.png"1051 },1052 "bookmarked": false,1053 "actions_summary": [],1054 "moderator": false,1055 "admin": false,1056 "staff": false,1057 "user_id": 24307,1058 "hidden": false,1059 "trust_level": 1,1060 "deleted_at": null,1061 "user_deleted": false,1062 "edit_reason": null,1063 "can_view_edit_history": true,1064 "wiki": false,1065 "post_url": "/t/is-it-possible-to-hijack-the-storage-of-data-needed-in-backward-pass/134312/3",1066 "can_accept_answer": false,1067 "can_unaccept_answer": false,1068 "accepted_answer": false,1069 "topic_accepted_answer": null1070 }1071 ],1072 "stream": [1073 311825,1074 311831,1075 3118411076 ]1077 },1078 "timeline_lookup": [1079 [1080 1,1081 14711082 ]1083 ],1084 "suggested_topics": [1085 {1086 "fancy_title": "Autograd and Temporary Variables",1087 "id": 219882,1088 "title": "Autograd and Temporary Variables",1089 "slug": "autograd-and-temporary-variables",1090 "posts_count": 5,1091 "reply_count": 3,1092 "highest_post_number": 5,1093 "image_url": null,1094 "created_at": "2025-05-09T04:29:38.438Z",1095 "last_posted_at": "2025-05-12T20:30:57.424Z",1096 "bumped": true,1097 "bumped_at": "2025-05-12T20:30:57.424Z",1098 "archetype": "regular",1099 "unseen": false,1100 "pinned": false,1101 "unpinned": null,1102 "visible": true,1103 "closed": false,1104 "archived": false,1105 "bookmarked": null,1106 "liked": null,1107 "tags_descriptions": {},1108 "like_count": 2,1109 "views": 159,1110 "category_id": 7,1111 "featured_link": null,1112 "has_accepted_answer": false,1113 "posters": [1114 {1115 "extras": "latest",1116 "description": "Original Poster, Most Recent Poster",1117 "user": {1118 "id": 84202,1119 "username": "Vaker",1120 "name": "Vaker",1121 "avatar_template": "/letter_avatar_proxy/v4/letter/v/da6949/{size}.png",1122 "trust_level": 11123 }1124 },1125 {1126 "extras": null,1127 "description": "Frequent Poster",1128 "user": {1129 "id": 18088,1130 "username": "KFrank",1131 "name": "K. Frank",1132 "avatar_template": "/letter_avatar_proxy/v4/letter/k/ecb155/{size}.png",1133 "trust_level": 21134 }1135 }1136 ]1137 },1138 {1139 "fancy_title": "Autograd FLOP Calculation with Higher Order Derivatives",1140 "id": 215279,1141 "title": "Autograd FLOP Calculation with Higher Order Derivatives",1142 "slug": "autograd-flop-calculation-with-higher-order-derivatives",1143 "posts_count": 4,1144 "reply_count": 2,1145 "highest_post_number": 4,1146 "image_url": null,1147 "created_at": "2025-01-11T21:47:37.146Z",1148 "last_posted_at": "2025-05-09T15:26:28.824Z",1149 "bumped": true,1150 "bumped_at": "2025-05-09T15:26:28.824Z",1151 "archetype": "regular",1152 "unseen": false,1153 "pinned": false,1154 "unpinned": null,1155 "visible": true,1156 "closed": false,1157 "archived": false,1158 "bookmarked": null,1159 "liked": null,1160 "tags_descriptions": {},1161 "like_count": 0,1162 "views": 205,1163 "category_id": 7,1164 "featured_link": null,1165 "has_accepted_answer": false,1166 "posters": [1167 {1168 "extras": "latest",1169 "description": "Original Poster, Most Recent Poster",1170 "user": {1171 "id": 74725,1172 "username": "alexi",1173 "name": "",1174 "avatar_template": "/letter_avatar_proxy/v4/letter/a/22d042/{size}.png",1175 "trust_level": 11176 }1177 },1178 {1179 "extras": null,1180 "description": "Frequent Poster",1181 "user": {1182 "id": 41396,1183 "username": "soulitzer",1184 "name": "",1185 "avatar_template": "/letter_avatar_proxy/v4/letter/s/839c29/{size}.png",1186 "trust_level": 21187 }1188 }1189 ]1190 },1191 {1192 "fancy_title": "How does autograd merges ‘parallel paths’?",1193 "id": 216527,1194 "title": "How does autograd merges 'parallel paths'?",1195 "slug": "how-does-autograd-merges-parallel-paths",1196 "posts_count": 4,1197 "reply_count": 2,1198 "highest_post_number": 4,1199 "image_url": "https://discuss.pytorch.org/uploads/default/optimized/3X/6/3/639e003dd19c00e78b46ff00dc8344cb98f2d667_2_768x1024.jpeg",1200 "created_at": "2025-02-11T11:19:47.819Z",