Anurag1734/cuda-error-resolution-analysis
07
1[2 {3 "post_stream": {4 "posts": [5 {6 "id": 211601,7 "name": "Xyry",8 "username": "xyry",9 "avatar_template": "/letter_avatar_proxy/v4/letter/x/c57346/{size}.png",10 "created_at": "2020-07-13T03:43:18.757Z",11 "cooked": "<p>The code is list below</p>\n<pre><code class=\"lang-python\">import os\nimport torch\nimport numpy as np\nfrom torch.autograd import Variable\nfrom torch import nn\nimport torch.nn.functional as F\nfrom torch.utils.data import Dataset,DataLoader\nfrom PIL import Image\nfrom torchvision import transforms as tfs\nfrom datetime import datetime\n\nimport matplotlib.pyplot as plt\ndef random_crop(data,label,crop_size):\n h,w=crop_size\n data,rect=tfs.RandomCrop((h,w))(data)\n label =tfs.FixedCrop(*rect)(label)\n return data,label\n\nim_show1=Image.open(\"/home/ypl/dataset/VOC/VOCdevkit/VOC2012/JPEGImages/2007_000032.jpg\")\nlabel_show1=Image.open(\"/home/ypl/dataset/VOC/VOCdevkit/VOC2012/SegmentationClass/2007_000032.png\")\n\nim_show2=Image.open(\"/home/ypl/dataset/VOC/VOCdevkit/VOC2012/JPEGImages/2007_000645.jpg\")\nlabel_show2=Image.open(\"/home/ypl/dataset/VOC/VOCdevkit/VOC2012/SegmentationClass/2007_000645.png\")\n\n_, figs = plt.subplots(2, 2, figsize=(10, 8))\ncrop_im1,crop_label1=random_crop(im_show1,label_show1,(200,300))\nfigs[0][0].imshow(crop_im1)\nfigs[0][0].axes.get_xaxis().set_visible(False)\nfigs[0][0].axes.get_yaxis().set_visible(False)\nfigs[0][1].imshow(crop_label1)\nfigs[0][1].axes.get_xaxis().set_visible(False)\nfigs[0][1].axes.get_yaxis().set_visible(False)\n</code></pre>\n<p>I got an error like this</p>\n<pre><code class=\"lang-auto\">Traceback (most recent call last):\n File \"vis_pic.py\", line 38, in <module>\n crop_im1,crop_label1=random_crop(im_show1,label_show1,(200,300))\n File \"vis_pic.py\", line 19, in random_crop\n data,rect=transform_train(data)\nTypeError: 'Image' object is not iterable\n</code></pre>\n<p>I have no idea to do, can anybody help me? I just want to random crop the pic and show them</p>",12 "post_number": 1,13 "post_type": 1,14 "posts_count": 3,15 "updated_at": "2020-07-13T03:43:58.821Z",16 "reply_count": 1,17 "reply_to_post_number": null,18 "quote_count": 0,19 "incoming_link_count": 139,20 "reads": 11,21 "readers_count": 10,22 "score": 702.2,23 "yours": false,24 "topic_id": 88928,25 "topic_slug": "data-rect-transforms-randomcrop-h-w-data-i-get-an-error-somebody-help-me",26 "display_username": "Xyry",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": 33750,48 "hidden": false,49 "trust_level": 1,50 "deleted_at": null,51 "user_deleted": false,52 "edit_reason": null,53 "can_view_edit_history": true,54 "wiki": false,55 "post_url": "/t/data-rect-transforms-randomcrop-h-w-data-i-get-an-error-somebody-help-me/88928/1",56 "can_accept_answer": false,57 "can_unaccept_answer": false,58 "accepted_answer": false,59 "topic_accepted_answer": true,60 "can_vote": false61 },62 {63 "id": 211658,64 "name": "Nikan Doosti",65 "username": "Nikronic",66 "avatar_template": "/user_avatar/discuss.pytorch.org/nikronic/{size}/71873_2.png",67 "created_at": "2020-07-13T07:42:47.429Z",68 "cooked": "<p>Hi,</p>\n<aside class=\"quote no-group\" data-username=\"xyry\" data-post=\"1\" data-topic=\"88928\">\n<div class=\"title\">\n<div class=\"quote-controls\"></div>\n<img loading=\"lazy\" alt=\"\" width=\"24\" height=\"24\" src=\"https://discuss.pytorch.org/letter_avatar_proxy/v4/letter/x/c57346/48.png\" class=\"avatar\"> xyry:</div>\n<blockquote>\n<p><code>data,rect=tfs.RandomCrop((h,w))(data)</code></p>\n</blockquote>\n</aside>\n<p><code>RandomCrop</code> does not return a tuple. It only crops the image and returns a <code>Image</code> object containing the cropped image. If you want the exact crop indices, you need to first create a <code>RandomCrop</code> object, then use its static method <code>.get_params(image, output_size)</code> which returns starting indices <code>i</code> and <code>j</code> and and the length of height and width <code>th</code> and <code>tw</code> respectively. After this, you can call <code>torch.nn.functional.crop(img, i, j, th, tw)</code> to get cropped image.</p>\n<p>I think my explanation was a little bit complex, in this case you can read the source of <code>RandomCrop</code>, but I have just added the main methods here:</p>\n<pre><code class=\"lang-auto\"> def get_params(img, output_size):\n \"\"\"Get parameters for ``crop`` for a random crop.\n\n Args:\n img (PIL Image): Image to be cropped.\n output_size (tuple): Expected output size of the crop.\n\n Returns:\n tuple: params (i, j, h, w) to be passed to ``crop`` for random crop.\n \"\"\"\n w, h = _get_image_size(img)\n th, tw = output_size\n if w == tw and h == th:\n return 0, 0, h, w\n\n i = random.randint(0, h - th)\n j = random.randint(0, w - tw)\n return i, j, th, tw\n\n def __call__(self, img):\n \"\"\"\n Args:\n img (PIL Image): Image to be cropped.\n\n Returns:\n PIL Image: Cropped image.\n \"\"\"\n if self.padding is not None:\n img = F.pad(img, self.padding, self.fill, self.padding_mode)\n\n # pad the width if needed\n if self.pad_if_needed and img.size[0] < self.size[1]:\n img = F.pad(img, (self.size[1] - img.size[0], 0), self.fill, self.padding_mode)\n # pad the height if needed\n if self.pad_if_needed and img.size[1] < self.size[0]:\n img = F.pad(img, (0, self.size[0] - img.size[1]), self.fill, self.padding_mode)\n\n i, j, h, w = self.get_params(img, self.size)\n\n return F.crop(img, i, j, h, w)\n</code></pre>\n<p>Bests</p>",69 "post_number": 2,70 "post_type": 1,71 "posts_count": 3,72 "updated_at": "2020-07-14T07:37:25.600Z",73 "reply_count": 1,74 "reply_to_post_number": null,75 "quote_count": 1,76 "incoming_link_count": 7,77 "reads": 10,78 "readers_count": 9,79 "score": 57.0,80 "yours": false,81 "topic_id": 88928,82 "topic_slug": "data-rect-transforms-randomcrop-h-w-data-i-get-an-error-somebody-help-me",83 "display_username": "Nikan Doosti",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 "link_counts": [98 {99 "url": "https://discuss.pytorch.org/t/how-to-do-deterministic-the-random-crop/93580/2",100 "internal": true,101 "reflection": true,102 "title": "How to do deterministic the random crop?",103 "clicks": 1104 }105 ],106 "read": true,107 "user_title": "",108 "bookmarked": false,109 "actions_summary": [110 {111 "id": 2,112 "count": 1113 }114 ],115 "moderator": false,116 "admin": false,117 "staff": false,118 "user_id": 12783,119 "hidden": false,120 "trust_level": 2,121 "deleted_at": null,122 "user_deleted": false,123 "edit_reason": null,124 "can_view_edit_history": true,125 "wiki": false,126 "post_url": "/t/data-rect-transforms-randomcrop-h-w-data-i-get-an-error-somebody-help-me/88928/2",127 "can_accept_answer": false,128 "can_unaccept_answer": false,129 "accepted_answer": true,130 "topic_accepted_answer": true131 },132 {133 "id": 212021,134 "name": "Xyry",135 "username": "xyry",136 "avatar_template": "/letter_avatar_proxy/v4/letter/x/c57346/{size}.png",137 "created_at": "2020-07-14T07:37:12.838Z",138 "cooked": "<p>thank you so much.<br>\nI changed the code like this</p>\n<pre><code class=\"lang-python\">data=tfs.RandomCrop((h,w))(data)\n\n</code></pre>\n<p>it works.<br>\nThanks again for your reply</p>",139 "post_number": 3,140 "post_type": 1,141 "posts_count": 3,142 "updated_at": "2020-07-14T07:37:12.838Z",143 "reply_count": 0,144 "reply_to_post_number": 2,145 "quote_count": 0,146 "incoming_link_count": 1,147 "reads": 8,148 "readers_count": 7,149 "score": 6.6,150 "yours": false,151 "topic_id": 88928,152 "topic_slug": "data-rect-transforms-randomcrop-h-w-data-i-get-an-error-somebody-help-me",153 "display_username": "Xyry",154 "primary_group_name": null,155 "flair_name": null,156 "flair_url": null,157 "flair_bg_color": null,158 "flair_color": null,159 "flair_group_id": null,160 "badges_granted": [],161 "version": 1,162 "can_edit": false,163 "can_delete": false,164 "can_recover": false,165 "can_see_hidden_post": false,166 "can_wiki": false,167 "read": true,168 "user_title": null,169 "reply_to_user": {170 "id": 12783,171 "username": "Nikronic",172 "name": "Nikan Doosti",173 "avatar_template": "/user_avatar/discuss.pytorch.org/nikronic/{size}/71873_2.png"174 },175 "bookmarked": false,176 "actions_summary": [],177 "moderator": false,178 "admin": false,179 "staff": false,180 "user_id": 33750,181 "hidden": false,182 "trust_level": 1,183 "deleted_at": null,184 "user_deleted": false,185 "edit_reason": null,186 "can_view_edit_history": true,187 "wiki": false,188 "post_url": "/t/data-rect-transforms-randomcrop-h-w-data-i-get-an-error-somebody-help-me/88928/3",189 "can_accept_answer": false,190 "can_unaccept_answer": false,191 "accepted_answer": false,192 "topic_accepted_answer": true193 }194 ],195 "stream": [196 211601,197 211658,198 212021199 ]200 },201 "timeline_lookup": [202 [203 1,204 1931205 ],206 [207 3,208 1930209 ]210 ],211 "suggested_topics": [212 {213 "fancy_title": "GPU Error unspecified launch failure",214 "id": 216460,215 "title": "GPU Error unspecified launch failure",216 "slug": "gpu-error-unspecified-launch-failure",217 "posts_count": 2,218 "reply_count": 1,219 "highest_post_number": 4,220 "image_url": null,221 "created_at": "2025-02-10T11:20:19.364Z",222 "last_posted_at": "2025-02-10T14:46:25.454Z",223 "bumped": true,224 "bumped_at": "2025-02-10T14:46:25.454Z",225 "archetype": "regular",226 "unseen": false,227 "pinned": false,228 "unpinned": null,229 "visible": true,230 "closed": false,231 "archived": false,232 "bookmarked": null,233 "liked": null,234 "tags_descriptions": {},235 "like_count": 0,236 "views": 179,237 "category_id": 1,238 "featured_link": null,239 "has_accepted_answer": false,240 "posters": [241 {242 "extras": "latest single",243 "description": "Original Poster, Most Recent Poster",244 "user": {245 "id": 82364,246 "username": "Sourabh_Yadav",247 "name": "Sourabh Yadav",248 "avatar_template": "/user_avatar/discuss.pytorch.org/sourabh_yadav/{size}/75350_2.png",249 "trust_level": 1250 }251 }252 ]253 },254 {255 "fancy_title": "Print(torch.cuda.is_available) return false",256 "id": 212840,257 "title": "Print(torch.cuda.is_available) return false",258 "slug": "print-torch-cuda-is-available-return-false",259 "posts_count": 2,260 "reply_count": 0,261 "highest_post_number": 2,262 "image_url": "https://discuss.pytorch.org/uploads/default/original/3X/e/7/e7381e98923704f3fc1980fc3d44eca827ec65df.png",263 "created_at": "2024-11-12T04:52:08.083Z",264 "last_posted_at": "2024-11-12T13:30:14.484Z",265 "bumped": true,266 "bumped_at": "2024-11-12T13:30:14.484Z",267 "archetype": "regular",268 "unseen": false,269 "pinned": false,270 "unpinned": null,271 "visible": true,272 "closed": false,273 "archived": false,274 "bookmarked": null,275 "liked": null,276 "tags_descriptions": {},277 "like_count": 0,278 "views": 147,279 "category_id": 1,280 "featured_link": null,281 "has_accepted_answer": false,282 "posters": [283 {284 "extras": null,285 "description": "Original Poster",286 "user": {287 "id": 80842,288 "username": "Dong1",289 "name": "Jacob",290 "avatar_template": "/user_avatar/discuss.pytorch.org/dong1/{size}/73940_2.png",291 "trust_level": 0292 }293 },294 {295 "extras": "latest",296 "description": "Most Recent Poster",297 "user": {298 "id": 3534,299 "username": "ptrblck",300 "name": "",301 "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",302 "admin": true,303 "moderator": true,304 "trust_level": 2305 }306 }307 ]308 },309 {310 "fancy_title": "Average tensor unbind times vary drastically depending on implementation of unrelated code flows",311 "id": 213953,312 "title": "Average tensor unbind times vary drastically depending on implementation of unrelated code flows",313 "slug": "average-tensor-unbind-times-vary-drastically-depending-on-implementation-of-unrelated-code-flows",314 "posts_count": 4,315 "reply_count": 0,316 "highest_post_number": 4,317 "image_url": null,318 "created_at": "2024-12-08T01:00:15.218Z",319 "last_posted_at": "2024-12-17T00:53:05.993Z",320 "bumped": true,321 "bumped_at": "2024-12-17T00:53:05.993Z",322 "archetype": "regular",323 "unseen": false,324 "pinned": false,325 "unpinned": null,326 "visible": true,327 "closed": false,328 "archived": false,329 "bookmarked": null,330 "liked": null,331 "tags_descriptions": {},332 "like_count": 0,333 "views": 54,334 "category_id": 1,335 "featured_link": null,336 "has_accepted_answer": true,337 "posters": [338 {339 "extras": "latest",340 "description": "Original Poster, Most Recent Poster",341 "user": {342 "id": 81381,343 "username": "JPK314",344 "name": "",345 "avatar_template": "/user_avatar/discuss.pytorch.org/jpk314/{size}/74419_2.png",346 "trust_level": 1347 }348 },349 {350 "extras": null,351 "description": "Frequent Poster, Accepted Answer",352 "user": {353 "id": 3534,354 "username": "ptrblck",355 "name": "",356 "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",357 "admin": true,358 "moderator": true,359 "trust_level": 2360 }361 },362 {363 "extras": null,364 "description": "Frequent Poster",365 "user": {366 "id": 50516,367 "username": "Yougrianes",368 "name": "Li Ruiqin",369 "avatar_template": "/user_avatar/discuss.pytorch.org/yougrianes/{size}/43781_2.png",370 "trust_level": 1371 }372 }373 ]374 },375 {376 "fancy_title": "Restored optimizer always report: [rank0]: AssertionError: No inf checks were recorded for this optimizer",377 "id": 214495,378 "title": "Restored optimizer always report: [rank0]: AssertionError: No inf checks were recorded for this optimizer",379 "slug": "restored-optimizer-always-report-rank0-assertionerror-no-inf-checks-were-recorded-for-this-optimizer",380 "posts_count": 1,381 "reply_count": 0,382 "highest_post_number": 1,383 "image_url": null,384 "created_at": "2024-12-21T13:24:07.951Z",385 "last_posted_at": "2024-12-21T13:24:07.988Z",386 "bumped": true,387 "bumped_at": "2024-12-21T13:24:07.988Z",388 "archetype": "regular",389 "unseen": false,390 "pinned": false,391 "unpinned": null,392 "visible": true,393 "closed": false,394 "archived": false,395 "bookmarked": null,396 "liked": null,397 "tags_descriptions": {},398 "like_count": 0,399 "views": 107,400 "category_id": 1,401 "featured_link": null,402 "has_accepted_answer": false,403 "posters": [404 {405 "extras": "latest single",406 "description": "Original Poster, Most Recent Poster",407 "user": {408 "id": 17807,409 "username": "AlexLuya",410 "name": "Alex Luya",411 "avatar_template": "/user_avatar/discuss.pytorch.org/alexluya/{size}/15408_2.png",412 "trust_level": 1413 }414 }415 ]416 },417 {418 "fancy_title": "Fuse adds in TorchScript",419 "id": 217999,420 "title": "Fuse adds in TorchScript",421 "slug": "fuse-adds-in-torchscript",422 "posts_count": 1,423 "reply_count": 0,424 "highest_post_number": 1,425 "image_url": null,426 "created_at": "2025-03-18T22:24:10.497Z",427 "last_posted_at": "2025-03-18T22:24:10.538Z",428 "bumped": true,429 "bumped_at": "2025-03-18T22:29:22.920Z",430 "archetype": "regular",431 "unseen": false,432 "pinned": false,433 "unpinned": null,434 "visible": true,435 "closed": false,436 "archived": false,437 "bookmarked": null,438 "liked": null,439 "tags_descriptions": {},440 "like_count": 0,441 "views": 37,442 "category_id": 1,443 "featured_link": null,444 "has_accepted_answer": false,445 "posters": [446 {447 "extras": "latest single",448 "description": "Original Poster, Most Recent Poster",449 "user": {450 "id": 83351,451 "username": "kamei",452 "name": "kamei",453 "avatar_template": "/user_avatar/discuss.pytorch.org/kamei/{size}/76232_2.png",454 "trust_level": 1455 }456 }457 ]458 }459 ],460 "tags_descriptions": {},461 "fancy_title": "data,rect=transforms.RandomCrop((h,w))(data) I get an error,somebody help me?",462 "id": 88928,463 "title": "data,rect=transforms.RandomCrop((h,w))(data) I get an error,somebody help me?",464 "posts_count": 3,465 "created_at": "2020-07-13T03:43:18.699Z",466 "views": 983,467 "reply_count": 1,468 "like_count": 1,469 "last_posted_at": "2020-07-14T07:37:12.838Z",470 "visible": true,471 "closed": false,472 "archived": false,473 "has_summary": false,474 "archetype": "regular",475 "slug": "data-rect-transforms-randomcrop-h-w-data-i-get-an-error-somebody-help-me",476 "category_id": 1,477 "word_count": 580,478 "deleted_at": null,479 "user_id": 33750,480 "featured_link": null,481 "pinned_globally": false,482 "pinned_at": null,483 "pinned_until": null,484 "image_url": null,485 "slow_mode_seconds": 0,486 "draft": null,487 "draft_key": "topic_88928",488 "draft_sequence": null,489 "unpinned": null,490 "pinned": false,491 "current_post_number": 1,492 "highest_post_number": 3,493 "deleted_by": null,494 "actions_summary": [495 {496 "id": 4,497 "count": 0,498 "hidden": false,499 "can_act": false500 },501 {502 "id": 8,503 "count": 0,504 "hidden": false,505 "can_act": false506 },507 {508 "id": 10,509 "count": 0,510 "hidden": false,511 "can_act": false512 },513 {514 "id": 7,515 "count": 0,516 "hidden": false,517 "can_act": false518 }519 ],520 "chunk_size": 20,521 "bookmarked": false,522 "topic_timer": null,523 "message_bus_last_id": 0,524 "participant_count": 2,525 "show_read_indicator": false,526 "thumbnails": null,527 "slow_mode_enabled_until": null,528 "accepted_answer": {529 "post_number": 2,530 "username": "Nikronic",531 "name": "Nikan Doosti",532 "excerpt": "Hi, \n\nRandomCrop does not return a tuple. It only crops the image and returns a Image object containing the cropped image. If you want the exact crop indices, you need to first create a RandomCrop object, then use its static method .get_params(image, output_size) which returns starting indices i and…"533 },534 "can_vote": false,535 "vote_count": 0,536 "user_voted": false,537 "discourse_zendesk_plugin_zendesk_id": null,538 "discourse_zendesk_plugin_zendesk_url": "https://your-url.zendesk.com/agent/tickets/",539 "details": {540 "can_edit": false,541 "notification_level": 1,542 "participants": [543 {544 "id": 33750,545 "username": "xyry",546 "name": "Xyry",547 "avatar_template": "/letter_avatar_proxy/v4/letter/x/c57346/{size}.png",548 "post_count": 2,549 "primary_group_name": null,550 "flair_name": null,551 "flair_url": null,552 "flair_color": null,553 "flair_bg_color": null,554 "flair_group_id": null,555 "trust_level": 1556 },557 {558 "id": 12783,559 "username": "Nikronic",560 "name": "Nikan Doosti",561 "avatar_template": "/user_avatar/discuss.pytorch.org/nikronic/{size}/71873_2.png",562 "post_count": 1,563 "primary_group_name": null,564 "flair_name": null,565 "flair_url": null,566 "flair_color": null,567 "flair_bg_color": null,568 "flair_group_id": null,569 "trust_level": 2570 }571 ],572 "created_by": {573 "id": 33750,574 "username": "xyry",575 "name": "Xyry",576 "avatar_template": "/letter_avatar_proxy/v4/letter/x/c57346/{size}.png"577 },578 "last_poster": {579 "id": 33750,580 "username": "xyry",581 "name": "Xyry",582 "avatar_template": "/letter_avatar_proxy/v4/letter/x/c57346/{size}.png"583 },584 "links": [585 {586 "url": "https://discuss.pytorch.org/t/how-to-do-deterministic-the-random-crop/93580/2",587 "title": "How to do deterministic the random crop?",588 "internal": true,589 "attachment": false,590 "reflection": true,591 "clicks": 1,592 "user_id": 12783,593 "domain": "discuss.pytorch.org",594 "root_domain": "pytorch.org"595 }596 ]597 },598 "bookmarks": []599 },600 {601 "post_stream": {602 "posts": [603 {604 "id": 212018,605 "name": "ENES",606 "username": "enesduran",607 "avatar_template": "/letter_avatar_proxy/v4/letter/e/f17d59/{size}.png",608 "created_at": "2020-07-14T07:26:22.585Z",609 "cooked": "<p>Hi,</p>\n<p>I want a function that returns the indices of the max elements of a 1D tensor. There will not be only<br>\nsingle max value. torch.max() method seems to return only one index, but I want multiple indexes.<br>\nif a=tensor([1,4,56,6,7,56,7]) I want to get [2,5]</p>\n<p>Thanks</p>",610 "post_number": 1,611 "post_type": 1,612 "posts_count": 1,613 "updated_at": "2020-07-14T07:26:22.585Z",614 "reply_count": 0,615 "reply_to_post_number": null,616 "quote_count": 0,617 "incoming_link_count": 16,618 "reads": 5,619 "readers_count": 4,620 "score": 81.0,621 "yours": false,622 "topic_id": 89112,623 "topic_slug": "returning-the-indices-of-max-elements-in-1d-tensor",624 "display_username": "ENES",625 "primary_group_name": null,626 "flair_name": null,627 "flair_url": null,628 "flair_bg_color": null,629 "flair_color": null,630 "flair_group_id": null,631 "badges_granted": [],632 "version": 1,633 "can_edit": false,634 "can_delete": false,635 "can_recover": false,636 "can_see_hidden_post": false,637 "can_wiki": false,638 "read": true,639 "user_title": null,640 "bookmarked": false,641 "actions_summary": [],642 "moderator": false,643 "admin": false,644 "staff": false,645 "user_id": 34276,646 "hidden": false,647 "trust_level": 1,648 "deleted_at": null,649 "user_deleted": false,650 "edit_reason": null,651 "can_view_edit_history": true,652 "wiki": false,653 "post_url": "/t/returning-the-indices-of-max-elements-in-1d-tensor/89112/1",654 "can_accept_answer": false,655 "can_unaccept_answer": false,656 "accepted_answer": false,657 "topic_accepted_answer": null,658 "can_vote": false659 }660 ],661 "stream": [662 212018663 ]664 },665 "timeline_lookup": [666 [667 1,668 1930669 ]670 ],671 "suggested_topics": [672 {673 "fancy_title": "Does PyTorch provide packages with _GLIBCXX_USE_CXX11_ABI=1?",674 "id": 214957,675 "title": "Does PyTorch provide packages with _GLIBCXX_USE_CXX11_ABI=1?",676 "slug": "does-pytorch-provide-packages-with-glibcxx-use-cxx11-abi-1",677 "posts_count": 3,678 "reply_count": 1,679 "highest_post_number": 3,680 "image_url": null,681 "created_at": "2025-01-04T10:53:53.137Z",682 "last_posted_at": "2025-01-06T06:58:20.181Z",683 "bumped": true,684 "bumped_at": "2025-01-06T06:58:20.181Z",685 "archetype": "regular",686 "unseen": false,687 "pinned": false,688 "unpinned": null,689 "visible": true,690 "closed": false,691 "archived": false,692 "bookmarked": null,693 "liked": null,694 "tags_descriptions": {},695 "like_count": 0,696 "views": 54,697 "category_id": 1,698 "featured_link": null,699 "has_accepted_answer": false,700 "posters": [701 {702 "extras": "latest",703 "description": "Original Poster, Most Recent Poster",704 "user": {705 "id": 81828,706 "username": "risemeup1",707 "name": "Risemeup1",708 "avatar_template": "/user_avatar/discuss.pytorch.org/risemeup1/{size}/74854_2.png",709 "trust_level": 1710 }711 },712 {713 "extras": null,714 "description": "Frequent Poster",715 "user": {716 "id": 3534,717 "username": "ptrblck",718 "name": "",719 "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",720 "admin": true,721 "moderator": true,722 "trust_level": 2723 }724 }725 ]726 },727 {728 "fancy_title": "Trying to setup a service, need some quick help with pytorch/cuda compatibility",729 "id": 212941,730 "title": "Trying to setup a service, need some quick help with pytorch/cuda compatibility",731 "slug": "trying-to-setup-a-service-need-some-quick-help-with-pytorch-cuda-compatibility",732 "posts_count": 5,733 "reply_count": 1,734 "highest_post_number": 5,735 "image_url": null,736 "created_at": "2024-11-13T17:12:20.490Z",737 "last_posted_at": "2024-11-14T22:34:42.979Z",738 "bumped": true,739 "bumped_at": "2024-11-14T22:34:42.979Z",740 "archetype": "regular",741 "unseen": false,742 "pinned": false,743 "unpinned": null,744 "visible": true,745 "closed": false,746 "archived": false,747 "bookmarked": null,748 "liked": null,749 "tags_descriptions": {},750 "like_count": 1,751 "views": 556,752 "category_id": 1,753 "featured_link": null,754 "has_accepted_answer": false,755 "posters": [756 {757 "extras": "latest",758 "description": "Original Poster, Most Recent Poster",759 "user": {760 "id": 80892,761 "username": "dillonius",762 "name": "",763 "avatar_template": "/user_avatar/discuss.pytorch.org/dillonius/{size}/73979_2.png",764 "trust_level": 0765 }766 },767 {768 "extras": null,769 "description": "Frequent Poster",770 "user": {771 "id": 3534,772 "username": "ptrblck",773 "name": "",774 "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",775 "admin": true,776 "moderator": true,777 "trust_level": 2778 }779 }780 ]781 },782 {783 "fancy_title": "DDP leads to Out of Memory error",784 "id": 213422,785 "title": "DDP leads to Out of Memory error",786 "slug": "ddp-leads-to-out-of-memory-error",787 "posts_count": 1,788 "reply_count": 0,789 "highest_post_number": 1,790 "image_url": null,791 "created_at": "2024-11-25T19:51:07.570Z",792 "last_posted_at": "2024-11-25T19:51:07.613Z",793 "bumped": true,794 "bumped_at": "2024-11-25T19:51:07.613Z",795 "archetype": "regular",796 "unseen": false,797 "pinned": false,798 "unpinned": null,799 "visible": true,800 "closed": false,801 "archived": false,802 "bookmarked": null,803 "liked": null,804 "tags_descriptions": {},805 "like_count": 0,806 "views": 58,807 "category_id": 1,808 "featured_link": null,809 "has_accepted_answer": false,810 "posters": [811 {812 "extras": "latest single",813 "description": "Original Poster, Most Recent Poster",814 "user": {815 "id": 37254,816 "username": "enterthevoidf22",817 "name": "",818 "avatar_template": "/user_avatar/discuss.pytorch.org/enterthevoidf22/{size}/29338_2.png",819 "trust_level": 2820 }821 }822 ]823 },824 {825 "fancy_title": "Maybe there is a precision issue with torch.quantize_per_channel?",826 "id": 212389,827 "title": "Maybe there is a precision issue with torch.quantize_per_channel?",828 "slug": "maybe-there-is-a-precision-issue-with-torch-quantize-per-channel",829 "posts_count": 4,830 "reply_count": 2,831 "highest_post_number": 5,832 "image_url": "https://discuss.pytorch.org/uploads/default/original/3X/8/0/80f2c0d04c4f656428959b361ec665e34314eb4f.png",833 "created_at": "2024-11-01T03:11:47.675Z",834 "last_posted_at": "2024-11-08T02:31:12.293Z",835 "bumped": true,836 "bumped_at": "2024-11-08T02:31:12.293Z",837 "archetype": "regular",838 "unseen": false,839 "pinned": false,840 "unpinned": null,841 "visible": true,842 "closed": false,843 "archived": false,844 "bookmarked": null,845 "liked": null,846 "tags_descriptions": {},847 "like_count": 1,848 "views": 48,849 "category_id": 1,850 "featured_link": null,851 "has_accepted_answer": false,852 "posters": [853 {854 "extras": null,855 "description": "Original Poster",856 "user": {857 "id": 80599,858 "username": "zfac",859 "name": "Zfac",860 "avatar_template": "/user_avatar/discuss.pytorch.org/zfac/{size}/73683_2.png",861 "trust_level": 1862 }863 },864 {865 "extras": "latest",866 "description": "Most Recent Poster",867 "user": {868 "id": 56768,869 "username": "yushu.gao",870 "name": "",871 "avatar_template": "/user_avatar/discuss.pytorch.org/yushu.gao/{size}/50534_2.png",872 "trust_level": 1873 }874 }875 ]876 },877 {878 "fancy_title": "RuntimeError: “rshift_cpu” not implemented for ‘Float’",879 "id": 216200,880 "title": "RuntimeError: \"rshift_cpu\" not implemented for 'Float'",881 "slug": "runtimeerror-rshift-cpu-not-implemented-for-float",882 "posts_count": 3,883 "reply_count": 1,884 "highest_post_number": 3,885 "image_url": null,886 "created_at": "2025-02-04T03:36:02.472Z",887 "last_posted_at": "2025-02-05T20:04:19.695Z",888 "bumped": true,889 "bumped_at": "2025-02-05T20:04:19.695Z",890 "archetype": "regular",891 "unseen": false,892 "pinned": false,893 "unpinned": null,894 "visible": true,895 "closed": false,896 "archived": false,897 "bookmarked": null,898 "liked": null,899 "tags_descriptions": {},900 "like_count": 0,901 "views": 186,902 "category_id": 1,903 "featured_link": null,904 "has_accepted_answer": true,905 "posters": [906 {907 "extras": null,908 "description": "Original Poster",909 "user": {910 "id": 75981,911 "username": "Geremia",912 "name": "Geremia",913 "avatar_template": "/user_avatar/discuss.pytorch.org/geremia/{size}/70165_2.png",914 "trust_level": 2915 }916 },917 {918 "extras": "latest",919 "description": "Most Recent Poster, Accepted Answer",920 "user": {921 "id": 3534,922 "username": "ptrblck",923 "name": "",924 "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",925 "admin": true,926 "moderator": true,927 "trust_level": 2928 }929 },930 {931 "extras": null,932 "description": "Frequent Poster",933 "user": {934 "id": 19553,935 "username": "anantguptadbl",936 "name": "Anant Gupta",937 "avatar_template": "/user_avatar/discuss.pytorch.org/anantguptadbl/{size}/17784_2.png",938 "trust_level": 2939 }940 }941 ]942 }943 ],944 "tags_descriptions": {},945 "fancy_title": "Returning the indices of max elements in 1D tensor",946 "id": 89112,947 "title": "Returning the indices of max elements in 1D tensor",948 "posts_count": 1,949 "created_at": "2020-07-14T07:26:22.535Z",950 "views": 278,951 "reply_count": 0,952 "like_count": 0,953 "last_posted_at": "2020-07-14T07:26:22.585Z",954 "visible": true,955 "closed": false,956 "archived": false,957 "has_summary": false,958 "archetype": "regular",959 "slug": "returning-the-indices-of-max-elements-in-1d-tensor",960 "category_id": 1,961 "word_count": 56,962 "deleted_at": null,963 "user_id": 34276,964 "featured_link": null,965 "pinned_globally": false,966 "pinned_at": null,967 "pinned_until": null,968 "image_url": null,969 "slow_mode_seconds": 0,970 "draft": null,971 "draft_key": "topic_89112",972 "draft_sequence": null,973 "unpinned": null,974 "pinned": false,975 "current_post_number": 1,976 "highest_post_number": 1,977 "deleted_by": null,978 "actions_summary": [979 {980 "id": 4,981 "count": 0,982 "hidden": false,983 "can_act": false984 },985 {986 "id": 8,987 "count": 0,988 "hidden": false,989 "can_act": false990 },991 {992 "id": 10,993 "count": 0,994 "hidden": false,995 "can_act": false996 },997 {998 "id": 7,999 "count": 0,1000 "hidden": false,1001 "can_act": false1002 }1003 ],1004 "chunk_size": 20,1005 "bookmarked": false,1006 "topic_timer": null,1007 "message_bus_last_id": 0,1008 "participant_count": 1,1009 "show_read_indicator": false,1010 "thumbnails": null,1011 "slow_mode_enabled_until": null,1012 "can_vote": false,1013 "vote_count": 0,1014 "user_voted": false,1015 "discourse_zendesk_plugin_zendesk_id": null,1016 "discourse_zendesk_plugin_zendesk_url": "https://your-url.zendesk.com/agent/tickets/",1017 "details": {1018 "can_edit": false,1019 "notification_level": 1,1020 "participants": [1021 {1022 "id": 34276,1023 "username": "enesduran",1024 "name": "ENES",1025 "avatar_template": "/letter_avatar_proxy/v4/letter/e/f17d59/{size}.png",1026 "post_count": 1,1027 "primary_group_name": null,1028 "flair_name": null,1029 "flair_url": null,1030 "flair_color": null,1031 "flair_bg_color": null,1032 "flair_group_id": null,1033 "trust_level": 11034 }1035 ],1036 "created_by": {1037 "id": 34276,1038 "username": "enesduran",1039 "name": "ENES",1040 "avatar_template": "/letter_avatar_proxy/v4/letter/e/f17d59/{size}.png"1041 },1042 "last_poster": {1043 "id": 34276,1044 "username": "enesduran",1045 "name": "ENES",1046 "avatar_template": "/letter_avatar_proxy/v4/letter/e/f17d59/{size}.png"1047 }1048 },1049 "bookmarks": []1050 },1051 {1052 "post_stream": {1053 "posts": [1054 {1055 "id": 160008,1056 "name": "Oktai Tatanov",1057 "username": "Oktai15",1058 "avatar_template": "/user_avatar/discuss.pytorch.org/oktai15/{size}/5942_2.png",1059 "created_at": "2020-01-21T12:58:08.141Z",1060 "cooked": "<p>What the benefit can we get from torch.nn.utils.prune now?<br>\nWill you plan to replace simple tensor with sparse tensor for speedup of inference and memory size of model?</p>",1061 "post_number": 1,1062 "post_type": 1,1063 "posts_count": 6,1064 "updated_at": "2020-01-21T12:59:13.952Z",1065 "reply_count": 0,1066 "reply_to_post_number": null,1067 "quote_count": 0,1068 "incoming_link_count": 515,1069 "reads": 56,1070 "readers_count": 55,1071 "score": 2591.2,1072 "yours": false,1073 "topic_id": 67262,1074 "topic_slug": "benefit-and-usage-of-torch-nn-utils-prune",1075 "display_username": "Oktai Tatanov",1076 "primary_group_name": null,1077 "flair_name": null,1078 "flair_url": null,1079 "flair_bg_color": null,1080 "flair_color": null,1081 "flair_group_id": null,1082 "badges_granted": [],1083 "version": 1,1084 "can_edit": false,1085 "can_delete": false,1086 "can_recover": false,1087 "can_see_hidden_post": false,1088 "can_wiki": false,1089 "read": true,1090 "user_title": null,1091 "bookmarked": false,1092 "actions_summary": [1093 {1094 "id": 2,1095 "count": 11096 }1097 ],1098 "moderator": false,1099 "admin": false,1100 "staff": false,1101 "user_id": 7344,1102 "hidden": false,1103 "trust_level": 2,1104 "deleted_at": null,1105 "user_deleted": false,1106 "edit_reason": null,1107 "can_view_edit_history": true,1108 "wiki": false,1109 "post_url": "/t/benefit-and-usage-of-torch-nn-utils-prune/67262/1",1110 "can_accept_answer": false,1111 "can_unaccept_answer": false,1112 "accepted_answer": false,1113 "topic_accepted_answer": null,1114 "can_vote": false1115 },1116 {1117 "id": 160034,1118 "name": "Alexander Shekhovtsov",1119 "username": "Alexander_Shekhovtso",1120 "avatar_template": "/user_avatar/discuss.pytorch.org/alexander_shekhovtso/{size}/19829_2.png",1121 "created_at": "2020-01-21T14:24:34.698Z",1122 "cooked": "<p>Join the questions. Not sure if it possible to speedup multiplication of sparse tensors for now. Global structured pruning could reduce multiplication count.<br>\nWho knows something about it, please check my related questions here <a href=\"https://discuss.pytorch.org/t/global-structured-pruning/67263\" class=\"inline-onebox\">Global structured pruning</a>.</p>",1123 "post_number": 2,1124 "post_type": 1,1125 "posts_count": 6,1126 "updated_at": "2020-01-21T14:24:34.698Z",1127 "reply_count": 1,1128 "reply_to_post_number": null,1129 "quote_count": 0,1130 "incoming_link_count": 4,1131 "reads": 57,1132 "readers_count": 56,1133 "score": 36.4,1134 "yours": false,1135 "topic_id": 67262,1136 "topic_slug": "benefit-and-usage-of-torch-nn-utils-prune",1137 "display_username": "Alexander Shekhovtsov",1138 "primary_group_name": null,1139 "flair_name": null,1140 "flair_url": null,1141 "flair_bg_color": null,1142 "flair_color": null,1143 "flair_group_id": null,1144 "badges_granted": [],1145 "version": 1,1146 "can_edit": false,1147 "can_delete": false,1148 "can_recover": false,1149 "can_see_hidden_post": false,1150 "can_wiki": false,1151 "link_counts": [1152 {1153 "url": "https://discuss.pytorch.org/t/global-structured-pruning/67263",1154 "internal": true,1155 "reflection": false,1156 "title": "Global structured pruning",1157 "clicks": 1011158 }1159 ],1160 "read": true,1161 "user_title": null,1162 "bookmarked": false,1163 "actions_summary": [],1164 "moderator": false,1165 "admin": false,1166 "staff": false,1167 "user_id": 26742,1168 "hidden": false,1169 "trust_level": 1,1170 "deleted_at": null,1171 "user_deleted": false,1172 "edit_reason": null,1173 "can_view_edit_history": true,1174 "wiki": false,1175 "post_url": "/t/benefit-and-usage-of-torch-nn-utils-prune/67262/2",1176 "can_accept_answer": false,1177 "can_unaccept_answer": false,1178 "accepted_answer": false,1179 "topic_accepted_answer": null1180 },1181 {1182 "id": 160203,1183 "name": "Oktai Tatanov",1184 "username": "Oktai15",1185 "avatar_template": "/user_avatar/discuss.pytorch.org/oktai15/{size}/5942_2.png",1186 "created_at": "2020-01-22T07:16:24.422Z",1187 "cooked": "<p>I agree with you, will wait answer from PyTorch Dev <img src=\"https://discuss.pytorch.org/images/emoji/apple/slight_smile.png?v=9\" title=\":slight_smile:\" class=\"emoji\" alt=\":slight_smile:\"></p>",1188 "post_number": 3,1189 "post_type": 1,1190 "posts_count": 6,1191 "updated_at": "2020-01-22T07:16:24.422Z",1192 "reply_count": 0,1193 "reply_to_post_number": 2,1194 "quote_count": 0,1195 "incoming_link_count": 7,1196 "reads": 55,1197 "readers_count": 54,1198 "score": 46.0,1199 "yours": false,1200 "topic_id": 67262,