CoolFace
Datasetpublic

Anurag1734/cuda-error-resolution-analysis

sourceHugging Faceupdated 2mo agoView on Hugging Face
0likes7downloads
topics_batch_103.json62338 linesDownload Raw Back to raw
1[2  {3    "post_stream": {4      "posts": [5        {6          "id": 420652,7          "name": "PARUL JOSHI",8          "username": "PARUL_JOSHI",9          "avatar_template": "/user_avatar/discuss.pytorch.org/parul_joshi/{size}/61770_2.png",10          "created_at": "2023-10-17T12:22:35.899Z",11          "cooked": "<p>I have an input <strong>k_norm</strong> of shape(N X D) say 32,250<br>\nI want to design a convolutional kernel name <strong>Wc</strong> in such a way that the output of :<br>\n<strong>Wc * k_norm</strong> would give a result shape of (N X 1)</p>\n<p>So,<br>\nWc = torch.nn.Conv2d(in_channels = ?, out_channels = ?, kernel_size=(?))</p>\n<p>The formula that I’m using is :<br>\nkc_hat = Wc * k_norm</p>\n<p>I want kc_hat shape as N X1</p>",12          "post_number": 1,13          "post_type": 1,14          "posts_count": 3,15          "updated_at": "2023-10-17T12:22:35.899Z",16          "reply_count": 1,17          "reply_to_post_number": null,18          "quote_count": 0,19          "incoming_link_count": 44,20          "reads": 10,21          "readers_count": 9,22          "score": 227.0,23          "yours": false,24          "topic_id": 190110,25          "topic_slug": "calculation-of-convolutional-kernel-in-pytorch",26          "display_username": "PARUL JOSHI",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": 67427,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/calculation-of-convolutional-kernel-in-pytorch/190110/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": 420858,64          "name": "K. Frank",65          "username": "KFrank",66          "avatar_template": "/letter_avatar_proxy/v4/letter/k/ecb155/{size}.png",67          "created_at": "2023-10-18T15:25:56.256Z",68          "cooked": "<p>Hi Parul!</p>\n<aside class=\"quote no-group\" data-username=\"PARUL_JOSHI\" data-post=\"1\" data-topic=\"190110\" data-full=\"true\">\n<div class=\"title\">\n<div class=\"quote-controls\"></div>\n<img loading=\"lazy\" alt=\"\" width=\"24\" height=\"24\" src=\"https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/parul_joshi/48/61770_2.png\" class=\"avatar\"> PARUL_JOSHI:</div>\n<blockquote>\n<p>I want to design a convolutional kernel name <strong>Wc</strong> in such a way that the output of :<br>\n<strong>Wc * k_norm</strong> would give a result shape of (N X 1)</p>\n</blockquote>\n</aside>\n<p>Could you explain your use case in a little more detail, maybe illustrating it<br>\nwith some sample code (even if the sample code doesn’t do what you want)?<br>\nWhat goal are you trying to achieve with your specified “result shape?”</p>\n<p>A couple of comments:  Pytorch’s <code>Conv2d</code> take a <em>four-dimensional</em> tensor as<br>\ninput, of shape <code>[nBatch, channels, height, width]</code>.  (It’s permissible for<br>\nthe <code>nBatch</code> and <code>channels</code> dimensions to have length one, but they still have<br>\nto be there.)  Also, you apply such a convolutions, <code>Wc = Conv2d ( stuff )</code><br>\nto its input using function-call notation:  <code>kc_hat = Wc (k_norm)</code>.</p>\n<p>Best.</p>\n<p>K. Frank</p>",69          "post_number": 2,70          "post_type": 1,71          "posts_count": 3,72          "updated_at": "2023-10-18T15:25:56.256Z",73          "reply_count": 0,74          "reply_to_post_number": null,75          "quote_count": 1,76          "incoming_link_count": 0,77          "reads": 7,78          "readers_count": 6,79          "score": 1.4,80          "yours": false,81          "topic_id": 190110,82          "topic_slug": "calculation-of-convolutional-kernel-in-pytorch",83          "display_username": "K. Frank",84          "primary_group_name": null,85          "flair_name": null,86          "flair_url": null,87          "flair_bg_color": null,88          "flair_color": null,89          "flair_group_id": null,90          "badges_granted": [],91          "version": 1,92          "can_edit": false,93          "can_delete": false,94          "can_recover": false,95          "can_see_hidden_post": false,96          "can_wiki": false,97          "read": true,98          "user_title": null,99          "bookmarked": false,100          "actions_summary": [],101          "moderator": false,102          "admin": false,103          "staff": false,104          "user_id": 18088,105          "hidden": false,106          "trust_level": 2,107          "deleted_at": null,108          "user_deleted": false,109          "edit_reason": null,110          "can_view_edit_history": true,111          "wiki": false,112          "post_url": "/t/calculation-of-convolutional-kernel-in-pytorch/190110/2",113          "can_accept_answer": false,114          "can_unaccept_answer": false,115          "accepted_answer": false,116          "topic_accepted_answer": true117        },118        {119          "id": 421066,120          "name": "J Johnson",121          "username": "J_Johnson",122          "avatar_template": "/user_avatar/discuss.pytorch.org/j_johnson/{size}/55494_2.png",123          "created_at": "2023-10-19T16:01:56.698Z",124          "cooked": "<p>When you take in consideration stride and dilation, there are hundreds of ways you could do this. But, for the sake of simplicity, let’s just assume those are 1 and 1 respectively. In that case, you’d need a kernel size of (1, D):</p>\n<pre><code class=\"lang-auto\">import torch\nimport torch.nn as nn\n\nN = 32\nD = 250\nbatch_size = 1\nchannels = 1\n\nkernel = nn.Conv2d(channels, channels, (1, D), bias = False)\n\nx = torch.rand((batch_size, channels, N, D))\n\nprint(kernel(x).size())\n</code></pre>",125          "post_number": 3,126          "post_type": 1,127          "posts_count": 3,128          "updated_at": "2023-10-19T16:01:56.698Z",129          "reply_count": 0,130          "reply_to_post_number": null,131          "quote_count": 0,132          "incoming_link_count": 2,133          "reads": 5,134          "readers_count": 4,135          "score": 11.0,136          "yours": false,137          "topic_id": 190110,138          "topic_slug": "calculation-of-convolutional-kernel-in-pytorch",139          "display_username": "J Johnson",140          "primary_group_name": null,141          "flair_name": null,142          "flair_url": null,143          "flair_bg_color": null,144          "flair_color": null,145          "flair_group_id": null,146          "badges_granted": [],147          "version": 1,148          "can_edit": false,149          "can_delete": false,150          "can_recover": false,151          "can_see_hidden_post": false,152          "can_wiki": false,153          "read": true,154          "user_title": null,155          "bookmarked": false,156          "actions_summary": [],157          "moderator": false,158          "admin": false,159          "staff": false,160          "user_id": 41458,161          "hidden": false,162          "trust_level": 2,163          "deleted_at": null,164          "user_deleted": false,165          "edit_reason": null,166          "can_view_edit_history": true,167          "wiki": false,168          "post_url": "/t/calculation-of-convolutional-kernel-in-pytorch/190110/3",169          "can_accept_answer": false,170          "can_unaccept_answer": false,171          "accepted_answer": true,172          "topic_accepted_answer": true173        }174      ],175      "stream": [176        420652,177        420858,178        421066179      ]180    },181    "timeline_lookup": [182      [183        1,184        739185      ],186      [187        2,188        738189      ],190      [191        3,192        737193      ]194    ],195    "suggested_topics": [196      {197        "fancy_title": "Temporal Fusion Transformer Error",198        "id": 213925,199        "title": "Temporal Fusion Transformer Error",200        "slug": "temporal-fusion-transformer-error",201        "posts_count": 3,202        "reply_count": 1,203        "highest_post_number": 3,204        "image_url": null,205        "created_at": "2024-12-06T20:29:08.583Z",206        "last_posted_at": "2024-12-17T19:48:46.480Z",207        "bumped": true,208        "bumped_at": "2024-12-17T19:48:46.480Z",209        "archetype": "regular",210        "unseen": false,211        "pinned": false,212        "unpinned": null,213        "visible": true,214        "closed": false,215        "archived": false,216        "bookmarked": null,217        "liked": null,218        "tags_descriptions": {},219        "like_count": 0,220        "views": 290,221        "category_id": 1,222        "featured_link": null,223        "has_accepted_answer": false,224        "posters": [225          {226            "extras": null,227            "description": "Original Poster",228            "user": {229              "id": 81366,230              "username": "himanshu_birla",231              "name": "himanshu birla",232              "avatar_template": "/user_avatar/discuss.pytorch.org/himanshu_birla/{size}/74403_2.png",233              "trust_level": 0234            }235          },236          {237            "extras": null,238            "description": "Frequent Poster",239            "user": {240              "id": 3534,241              "username": "ptrblck",242              "name": "",243              "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",244              "admin": true,245              "moderator": true,246              "trust_level": 2247            }248          },249          {250            "extras": "latest",251            "description": "Most Recent Poster",252            "user": {253              "id": 81553,254              "username": "Juan_pablo_Mazo_quin",255              "name": "Juan pablo Mazo quintero",256              "avatar_template": "/user_avatar/discuss.pytorch.org/juan_pablo_mazo_quin/{size}/74572_2.png",257              "trust_level": 1258            }259          }260        ]261      },262      {263        "fancy_title": "How to add value to tensor multiple times by index",264        "id": 212382,265        "title": "How to add value to tensor multiple times by index",266        "slug": "how-to-add-value-to-tensor-multiple-times-by-index",267        "posts_count": 3,268        "reply_count": 0,269        "highest_post_number": 3,270        "image_url": null,271        "created_at": "2024-10-31T20:08:52.361Z",272        "last_posted_at": "2024-11-06T07:14:05.689Z",273        "bumped": true,274        "bumped_at": "2024-11-06T07:14:05.689Z",275        "archetype": "regular",276        "unseen": false,277        "pinned": false,278        "unpinned": null,279        "visible": true,280        "closed": false,281        "archived": false,282        "bookmarked": null,283        "liked": null,284        "tags_descriptions": {},285        "like_count": 1,286        "views": 181,287        "category_id": 1,288        "featured_link": null,289        "has_accepted_answer": false,290        "posters": [291          {292            "extras": "latest",293            "description": "Original Poster, Most Recent Poster",294            "user": {295              "id": 80623,296              "username": "dronnet1",297              "name": "Андрей Медведев",298              "avatar_template": "/user_avatar/discuss.pytorch.org/dronnet1/{size}/73708_2.png",299              "trust_level": 1300            }301          },302          {303            "extras": null,304            "description": "Frequent Poster",305            "user": {306              "id": 72430,307              "username": "Eduardo_Lawson",308              "name": "Eduardo Lawson da Silva",309              "avatar_template": "/user_avatar/discuss.pytorch.org/eduardo_lawson/{size}/66899_2.png",310              "trust_level": 2311            }312          }313        ]314      },315      {316        "fancy_title": "Permute inside nn.Sequential",317        "id": 214877,318        "title": "Permute inside nn.Sequential",319        "slug": "permute-inside-nn-sequential",320        "posts_count": 3,321        "reply_count": 0,322        "highest_post_number": 3,323        "image_url": null,324        "created_at": "2025-01-02T08:19:47.254Z",325        "last_posted_at": "2025-09-15T19:19:55.247Z",326        "bumped": true,327        "bumped_at": "2025-09-15T19:19:55.247Z",328        "archetype": "regular",329        "unseen": false,330        "pinned": false,331        "unpinned": null,332        "visible": true,333        "closed": false,334        "archived": false,335        "bookmarked": null,336        "liked": null,337        "tags_descriptions": {},338        "like_count": 1,339        "views": 476,340        "category_id": 1,341        "featured_link": null,342        "has_accepted_answer": false,343        "posters": [344          {345            "extras": null,346            "description": "Original Poster",347            "user": {348              "id": 81597,349              "username": "nada",350              "name": null,351              "avatar_template": "/letter_avatar_proxy/v4/letter/n/a88e4f/{size}.png",352              "trust_level": 1353            }354          },355          {356            "extras": null,357            "description": "Frequent Poster",358            "user": {359              "id": 3534,360              "username": "ptrblck",361              "name": "",362              "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",363              "admin": true,364              "moderator": true,365              "trust_level": 2366            }367          },368          {369            "extras": "latest",370            "description": "Most Recent Poster",371            "user": {372              "id": 32812,373              "username": "Bjorn_Lindqvist",374              "name": "Björn Lindqvist",375              "avatar_template": "/user_avatar/discuss.pytorch.org/bjorn_lindqvist/{size}/25326_2.png",376              "trust_level": 2377            }378          }379        ]380      },381      {382        "fancy_title": "ImportError : cannot import name ‘DiagnosticOptions’ from ‘torch.onnx._internal.exporter’",383        "id": 215989,384        "title": "ImportError : cannot import name ‘DiagnosticOptions’ from ‘torch.onnx._internal.exporter’",385        "slug": "importerror-cannot-import-name-diagnosticoptions-from-torch-onnx-internal-exporter",386        "posts_count": 2,387        "reply_count": 0,388        "highest_post_number": 2,389        "image_url": "https://discuss.pytorch.org/uploads/default/optimized/3X/a/3/a3a542821235a5d5307f1577a9ede9d33da98334_2_1024x282.png",390        "created_at": "2025-01-28T13:17:41.487Z",391        "last_posted_at": "2025-02-10T06:40:11.050Z",392        "bumped": true,393        "bumped_at": "2025-02-10T06:40:11.050Z",394        "archetype": "regular",395        "unseen": false,396        "pinned": false,397        "unpinned": null,398        "visible": true,399        "closed": false,400        "archived": false,401        "bookmarked": null,402        "liked": null,403        "tags_descriptions": {},404        "like_count": 0,405        "views": 1679,406        "category_id": 1,407        "featured_link": null,408        "has_accepted_answer": false,409        "posters": [410          {411            "extras": null,412            "description": "Original Poster",413            "user": {414              "id": 82357,415              "username": "cyy",416              "name": "adqdqefwe",417              "avatar_template": "/letter_avatar_proxy/v4/letter/c/e480ec/{size}.png",418              "trust_level": 0419            }420          },421          {422            "extras": "latest",423            "description": "Most Recent Poster",424            "user": {425              "id": 71955,426              "username": "ashok_arora",427              "name": "Ashok Arora",428              "avatar_template": "/user_avatar/discuss.pytorch.org/ashok_arora/{size}/66772_2.png",429              "trust_level": 1430            }431          }432        ]433      },434      {435        "fancy_title": "Precision-ill is undefined while training Pytorch Models",436        "id": 218235,437        "title": "Precision-ill is undefined while training Pytorch Models",438        "slug": "precision-ill-is-undefined-while-training-pytorch-models",439        "posts_count": 1,440        "reply_count": 0,441        "highest_post_number": 1,442        "image_url": null,443        "created_at": "2025-03-25T10:39:35.467Z",444        "last_posted_at": "2025-03-25T10:39:35.509Z",445        "bumped": true,446        "bumped_at": "2025-03-25T15:22:02.738Z",447        "archetype": "regular",448        "unseen": false,449        "pinned": false,450        "unpinned": null,451        "visible": true,452        "closed": false,453        "archived": false,454        "bookmarked": null,455        "liked": null,456        "tags_descriptions": {},457        "like_count": 0,458        "views": 37,459        "category_id": 1,460        "featured_link": null,461        "has_accepted_answer": false,462        "posters": [463          {464            "extras": "latest single",465            "description": "Original Poster, Most Recent Poster",466            "user": {467              "id": 83401,468              "username": "koussayinsat12",469              "name": "GHAOUARI KOUSAI",470              "avatar_template": "/user_avatar/discuss.pytorch.org/koussayinsat12/{size}/76275_2.png",471              "trust_level": 1472            }473          }474        ]475      }476    ],477    "tags_descriptions": {},478    "fancy_title": "Calculation of Convolutional Kernel in Pytorch",479    "id": 190110,480    "title": "Calculation of Convolutional Kernel in Pytorch",481    "posts_count": 3,482    "created_at": "2023-10-17T12:22:35.837Z",483    "views": 380,484    "reply_count": 0,485    "like_count": 0,486    "last_posted_at": "2023-10-19T16:01:56.698Z",487    "visible": true,488    "closed": false,489    "archived": false,490    "has_summary": false,491    "archetype": "regular",492    "slug": "calculation-of-convolutional-kernel-in-pytorch",493    "category_id": 1,494    "word_count": 288,495    "deleted_at": null,496    "user_id": 67427,497    "featured_link": null,498    "pinned_globally": false,499    "pinned_at": null,500    "pinned_until": null,501    "image_url": null,502    "slow_mode_seconds": 0,503    "draft": null,504    "draft_key": "topic_190110",505    "draft_sequence": null,506    "unpinned": null,507    "pinned": false,508    "current_post_number": 1,509    "highest_post_number": 3,510    "deleted_by": null,511    "actions_summary": [512      {513        "id": 4,514        "count": 0,515        "hidden": false,516        "can_act": false517      },518      {519        "id": 8,520        "count": 0,521        "hidden": false,522        "can_act": false523      },524      {525        "id": 10,526        "count": 0,527        "hidden": false,528        "can_act": false529      },530      {531        "id": 7,532        "count": 0,533        "hidden": false,534        "can_act": false535      }536    ],537    "chunk_size": 20,538    "bookmarked": false,539    "topic_timer": null,540    "message_bus_last_id": 0,541    "participant_count": 3,542    "show_read_indicator": false,543    "thumbnails": null,544    "slow_mode_enabled_until": null,545    "accepted_answer": {546      "post_number": 3,547      "username": "J_Johnson",548      "name": "J Johnson",549      "excerpt": "When you take in consideration stride and dilation, there are hundreds of ways you could do this. But, for the sake of simplicity, let’s just assume those are 1 and 1 respectively. In that case, you’d need a kernel size of (1, D): \nimport torch\nimport torch.nn as nn\n\nN = 32\nD = 250\nbatch_size = 1\nch&hellip;"550    },551    "can_vote": false,552    "vote_count": 0,553    "user_voted": false,554    "discourse_zendesk_plugin_zendesk_id": null,555    "discourse_zendesk_plugin_zendesk_url": "https://your-url.zendesk.com/agent/tickets/",556    "details": {557      "can_edit": false,558      "notification_level": 1,559      "participants": [560        {561          "id": 18088,562          "username": "KFrank",563          "name": "K. Frank",564          "avatar_template": "/letter_avatar_proxy/v4/letter/k/ecb155/{size}.png",565          "post_count": 1,566          "primary_group_name": null,567          "flair_name": null,568          "flair_url": null,569          "flair_color": null,570          "flair_bg_color": null,571          "flair_group_id": null,572          "trust_level": 2573        },574        {575          "id": 41458,576          "username": "J_Johnson",577          "name": "J Johnson",578          "avatar_template": "/user_avatar/discuss.pytorch.org/j_johnson/{size}/55494_2.png",579          "post_count": 1,580          "primary_group_name": null,581          "flair_name": null,582          "flair_url": null,583          "flair_color": null,584          "flair_bg_color": null,585          "flair_group_id": null,586          "trust_level": 2587        },588        {589          "id": 67427,590          "username": "PARUL_JOSHI",591          "name": "PARUL JOSHI",592          "avatar_template": "/user_avatar/discuss.pytorch.org/parul_joshi/{size}/61770_2.png",593          "post_count": 1,594          "primary_group_name": null,595          "flair_name": null,596          "flair_url": null,597          "flair_color": null,598          "flair_bg_color": null,599          "flair_group_id": null,600          "trust_level": 1601        }602      ],603      "created_by": {604        "id": 67427,605        "username": "PARUL_JOSHI",606        "name": "PARUL JOSHI",607        "avatar_template": "/user_avatar/discuss.pytorch.org/parul_joshi/{size}/61770_2.png"608      },609      "last_poster": {610        "id": 41458,611        "username": "J_Johnson",612        "name": "J Johnson",613        "avatar_template": "/user_avatar/discuss.pytorch.org/j_johnson/{size}/55494_2.png"614      }615    },616    "bookmarks": []617  },618  {619    "post_stream": {620      "posts": [621        {622          "id": 420969,623          "name": "Aniruth Sundararajan",624          "username": "Aniruth_Sundararajan",625          "avatar_template": "/user_avatar/discuss.pytorch.org/aniruth_sundararajan/{size}/63308_2.png",626          "created_at": "2023-10-19T03:23:13.759Z",627          "cooked": "<p>I am trying to load my shanghai dataset for training . When I used the normal default Data Loader , i kept getting an empty dataset , even if my path was correct .<br>\nSo , i circumvented it by using torch.utils.data.subset , and the same dataset was read .</p>\n<p>My Problem is , when I check the length of the subset , it is giving me correctly , the length of the dataset I have, but when I run my code for training , I keep getting a None Type Error .</p>\n<p>Another issue is , if I give subset size as just 2 , then my training occurs  , only for those 2 samples .</p>\n<p>My Code :<br>\nshanghai_dataset = SHANGHAITECH(path_ )</p>\n<p><span class=\"hashtag-raw\">#data_loader2</span> = torch.utils.data.DataLoader(shanghai_dataset)   <span class=\"hashtag-raw\">#This</span> is loading an empty dataset</p>\n<p>data_loader2 = torch.utils.data.Subset(shanghai_dataset  , indices = [i for i in range(0 , 300)] )</p>\n<p>num_epochs = 800<br>\nfor epoch in range(num_epochs):<br>\nfor batch_idx, batch in enumerate(data_loader2):<br>\nvideo_frames = batch[batch_idx]<br>\nprint(batch_idx)<br>\nprint(video_frames)<br>\nvisual_features = combined_model(video_frames)<br>\nvisual_features = visual_features.view(-1)</p>\n<pre><code>\t#anomaly_scores = anomaly_detection_head(video_frames)\n  labels=torch.tensor([0.0 , 0.0 , 0.0 , 0.0])\n  loss = criterion(visual_features, labels )\n  optimizer.zero_grad()\n  loss.backward()\n  optimizer.step()\n  \nprint(f'Epoch [{epoch + 1}/{num_epochs}], Loss: {loss.item()}')\n</code></pre>\n<p>Output , if subset length is  300<br>\n&lt;First  2 video array values are printed&gt;<br>\n2<br>\nNone<br>\nTraceback (most recent call last):<br>\nFile “/content/gdrive/MyDrive/Final/video_swin_transformer/train.py”, line 289, in <br>\nvisual_features = combined_model(video_frames)<br>\nFile “/usr/local/lib/python3.10/site-packages/torch/nn/modules/module.py”, line 1518, in _wrapped_call_impl<br>\nreturn self._call_impl(*args, **kwargs)<br>\nFile “/usr/local/lib/python3.10/site-packages/torch/nn/modules/module.py”, line 1527, in _call_impl<br>\nreturn forward_call(*args, **kwargs)<br>\nFile “/usr/local/lib/python3.10/site-packages/torch/nn/modules/container.py”, line 215, in forward<br>\ninput = module(input)<br>\nFile “/usr/local/lib/python3.10/site-packages/torch/nn/modules/module.py”, line 1518, in _wrapped_call_impl<br>\nreturn self._call_impl(*args, **kwargs)<br>\nFile “/usr/local/lib/python3.10/site-packages/torch/nn/modules/module.py”, line 1527, in _call_impl<br>\nreturn forward_call(*args, **kwargs)<br>\nFile “/content/gdrive/MyDrive/Final/video_swin_transformer/mmaction/models/backbones/swin_transformer.py”, line 652, in forward<br>\nx = self.patch_embed(x)<br>\nFile “/usr/local/lib/python3.10/site-packages/torch/nn/modules/module.py”, line 1518, in _wrapped_call_impl<br>\nreturn self._call_impl(*args, **kwargs)<br>\nFile “/usr/local/lib/python3.10/site-packages/torch/nn/modules/module.py”, line 1527, in _call_impl<br>\nreturn forward_call(*args, **kwargs)<br>\nFile “/content/gdrive/MyDrive/Final/video_swin_transformer/mmaction/models/backbones/swin_transformer.py”, line 441, in forward<br>\n_, _, D, H, W = x.size()<br>\nAttributeError: ‘NoneType’ object has no attribute ‘size’</p>\n<p>Output if length of the subset is 2</p>\n<p>Normal epoch vs loss gets printed without any issues</p>",628          "post_number": 1,629          "post_type": 1,630          "posts_count": 2,631          "updated_at": "2023-10-19T03:23:13.759Z",632          "reply_count": 0,633          "reply_to_post_number": null,634          "quote_count": 0,635          "incoming_link_count": 56,636          "reads": 10,637          "readers_count": 9,638          "score": 277.0,639          "yours": false,640          "topic_id": 190254,641          "topic_slug": "data-loading-using-pytorch",642          "display_username": "Aniruth Sundararajan",643          "primary_group_name": null,644          "flair_name": null,645          "flair_url": null,646          "flair_bg_color": null,647          "flair_color": null,648          "flair_group_id": null,649          "badges_granted": [],650          "version": 1,651          "can_edit": false,652          "can_delete": false,653          "can_recover": false,654          "can_see_hidden_post": false,655          "can_wiki": false,656          "read": true,657          "user_title": null,658          "bookmarked": false,659          "actions_summary": [],660          "moderator": false,661          "admin": false,662          "staff": false,663          "user_id": 70254,664          "hidden": false,665          "trust_level": 0,666          "deleted_at": null,667          "user_deleted": false,668          "edit_reason": null,669          "can_view_edit_history": true,670          "wiki": false,671          "post_url": "/t/data-loading-using-pytorch/190254/1",672          "can_accept_answer": false,673          "can_unaccept_answer": false,674          "accepted_answer": false,675          "topic_accepted_answer": null,676          "can_vote": false677        },678        {679          "id": 421062,680          "name": "Roopali Bhavanasi",681          "username": "Roopali_Bhavanasi",682          "avatar_template": "/user_avatar/discuss.pytorch.org/roopali_bhavanasi/{size}/61570_2.png",683          "created_at": "2023-10-19T15:43:01.497Z",684          "cooked": "<p>I am facing a similar issue.Even I used torch.utils. DataLoader() but then I was not able read any of the data files even though my path was correct .I tried the same using subset  but then when I give index length  more than two.It is giving me null.</p>",685          "post_number": 2,686          "post_type": 1,687          "posts_count": 2,688          "updated_at": "2023-10-19T15:43:01.497Z",689          "reply_count": 0,690          "reply_to_post_number": null,691          "quote_count": 0,692          "incoming_link_count": 1,693          "reads": 8,694          "readers_count": 7,695          "score": 6.6,696          "yours": false,697          "topic_id": 190254,698          "topic_slug": "data-loading-using-pytorch",699          "display_username": "Roopali Bhavanasi",700          "primary_group_name": null,701          "flair_name": null,702          "flair_url": null,703          "flair_bg_color": null,704          "flair_color": null,705          "flair_group_id": null,706          "badges_granted": [],707          "version": 1,708          "can_edit": false,709          "can_delete": false,710          "can_recover": false,711          "can_see_hidden_post": false,712          "can_wiki": false,713          "read": true,714          "user_title": null,715          "bookmarked": false,716          "actions_summary": [],717          "moderator": false,718          "admin": false,719          "staff": false,720          "user_id": 70274,721          "hidden": false,722          "trust_level": 0,723          "deleted_at": null,724          "user_deleted": false,725          "edit_reason": null,726          "can_view_edit_history": true,727          "wiki": false,728          "post_url": "/t/data-loading-using-pytorch/190254/2",729          "can_accept_answer": false,730          "can_unaccept_answer": false,731          "accepted_answer": false,732          "topic_accepted_answer": null733        }734      ],735      "stream": [736        420969,737        421062738      ]739    },740    "timeline_lookup": [741      [742        1,743        738744      ],745      [746        2,747        737748      ]749    ],750    "suggested_topics": [751      {752        "fancy_title": "Reusing worker processes across different DataLoader instances",753        "id": 216387,754        "title": "Reusing worker processes across different DataLoader instances",755        "slug": "reusing-worker-processes-across-different-dataloader-instances",756        "posts_count": 1,757        "reply_count": 0,758        "highest_post_number": 1,759        "image_url": null,760        "created_at": "2025-02-07T23:36:36.020Z",761        "last_posted_at": "2025-02-07T23:36:36.064Z",762        "bumped": true,763        "bumped_at": "2025-02-07T23:36:36.064Z",764        "archetype": "regular",765        "unseen": false,766        "pinned": false,767        "unpinned": null,768        "visible": true,769        "closed": false,770        "archived": false,771        "bookmarked": null,772        "liked": null,773        "tags_descriptions": {},774        "like_count": 0,775        "views": 52,776        "category_id": 37,777        "featured_link": null,778        "has_accepted_answer": false,779        "posters": [780          {781            "extras": "latest single",782            "description": "Original Poster, Most Recent Poster",783            "user": {784              "id": 82554,785              "username": "smolboii",786              "name": "smolboii",787              "avatar_template": "/user_avatar/discuss.pytorch.org/smolboii/{size}/75537_2.png",788              "trust_level": 1789            }790          }791        ]792      },793      {794        "fancy_title": "Encountered strange overfitting during training, with `num_worker &gt; 0`, when shuffling is off",795        "id": 213263,796        "title": "Encountered strange overfitting during training, with `num_worker > 0`, when shuffling is off",797        "slug": "encountered-strange-overfitting-during-training-with-num-worker-0-when-shuffling-is-off",798        "posts_count": 5,799        "reply_count": 2,800        "highest_post_number": 5,801        "image_url": "https://discuss.pytorch.org/uploads/default/original/3X/a/9/a92b412f4e5991ec0528b44bea73d1764d1f8838.png",802        "created_at": "2024-11-21T10:55:19.879Z",803        "last_posted_at": "2025-02-24T04:10:33.257Z",804        "bumped": true,805        "bumped_at": "2025-02-24T04:10:33.257Z",806        "archetype": "regular",807        "unseen": false,808        "pinned": false,809        "unpinned": null,810        "visible": true,811        "closed": false,812        "archived": false,813        "bookmarked": null,814        "liked": null,815        "tags_descriptions": {},816        "like_count": 0,817        "views": 411,818        "category_id": 37,819        "featured_link": null,820        "has_accepted_answer": false,821        "posters": [822          {823            "extras": null,824            "description": "Original Poster",825            "user": {826              "id": 80706,827              "username": "melisande-c",828              "name": "Melisande Croft",829              "avatar_template": "/user_avatar/discuss.pytorch.org/melisande-c/{size}/73788_2.png",830              "trust_level": 1831            }832          },833          {834            "extras": "latest",835            "description": "Most Recent Poster",836            "user": {837              "id": 81103,838              "username": "traincheck-team",839              "name": "",840              "avatar_template": "/user_avatar/discuss.pytorch.org/traincheck-team/{size}/73668_2.png",841              "trust_level": 1842            }843          }844        ]845      },846      {847        "fancy_title": "Low GPU Utilization (~10%) with HF Datasets Streaming on Vertex with PyTorch Trainer",848        "id": 213157,849        "title": "Low GPU Utilization (~10%) with HF Datasets Streaming on Vertex with PyTorch Trainer",850        "slug": "low-gpu-utilization-10-with-hf-datasets-streaming-on-vertex-with-pytorch-trainer",851        "posts_count": 1,852        "reply_count": 0,853        "highest_post_number": 1,854        "image_url": null,855        "created_at": "2024-11-19T12:51:35.715Z",856        "last_posted_at": "2024-11-19T12:51:35.774Z",857        "bumped": true,858        "bumped_at": "2024-11-19T13:55:15.111Z",859        "archetype": "regular",860        "unseen": false,861        "pinned": false,862        "unpinned": null,863        "visible": true,864        "closed": false,865        "archived": false,866        "bookmarked": null,867        "liked": null,868        "tags_descriptions": {},869        "like_count": 0,870        "views": 66,871        "category_id": 37,872        "featured_link": null,873        "has_accepted_answer": false,874        "posters": [875          {876            "extras": "latest single",877            "description": "Original Poster, Most Recent Poster",878            "user": {879              "id": 68538,880              "username": "lpolisi",881              "name": "",882              "avatar_template": "/user_avatar/discuss.pytorch.org/lpolisi/{size}/63030_2.png",883              "trust_level": 1884            }885          }886        ]887      },888      {889        "fancy_title": "Losing Mask Data",890        "id": 213711,891        "title": "Losing Mask Data",892        "slug": "losing-mask-data",893        "posts_count": 5,894        "reply_count": 1,895        "highest_post_number": 5,896        "image_url": null,897        "created_at": "2024-12-02T15:28:21.758Z",898        "last_posted_at": "2024-12-04T13:32:52.827Z",899        "bumped": true,900        "bumped_at": "2024-12-04T13:32:52.827Z",901        "archetype": "regular",902        "unseen": false,903        "pinned": false,904        "unpinned": null,905        "visible": true,906        "closed": false,907        "archived": false,908        "bookmarked": null,909        "liked": null,910        "tags_descriptions": {},911        "like_count": 0,912        "views": 268,913        "category_id": 37,914        "featured_link": null,915        "has_accepted_answer": false,916        "posters": [917          {918            "extras": null,919            "description": "Original Poster",920            "user": {921              "id": 81251,922              "username": "NoahKling",923              "name": "Noah Kling",924              "avatar_template": "/user_avatar/discuss.pytorch.org/noahkling/{size}/74303_2.png",925              "trust_level": 0926            }927          },928          {929            "extras": "latest",930            "description": "Most Recent Poster",931            "user": {932              "id": 3534,933              "username": "ptrblck",934              "name": "",935              "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",936              "admin": true,937              "moderator": true,938              "trust_level": 2939            }940          }941        ]942      },943      {944        "fancy_title": "Sizes of tensors must match except in dimension 0. Expected size 914 but got size 531 for tensor number 1 in the list",945        "id": 216813,946        "title": "Sizes of tensors must match except in dimension 0. Expected size 914 but got size 531 for tensor number 1 in the list",947        "slug": "sizes-of-tensors-must-match-except-in-dimension-0-expected-size-914-but-got-size-531-for-tensor-number-1-in-the-list",948        "posts_count": 3,949        "reply_count": 1,950        "highest_post_number": 3,951        "image_url": null,952        "created_at": "2025-02-18T08:08:49.761Z",953        "last_posted_at": "2025-02-20T15:43:24.065Z",954        "bumped": true,955        "bumped_at": "2025-02-20T15:43:24.065Z",956        "archetype": "regular",957        "unseen": false,958        "pinned": false,959        "unpinned": null,960        "visible": true,961        "closed": false,962        "archived": false,963        "bookmarked": null,964        "liked": null,965        "tags_descriptions": {},966        "like_count": 0,967        "views": 129,968        "category_id": 37,969        "featured_link": null,970        "has_accepted_answer": false,971        "posters": [972          {973            "extras": "latest",974            "description": "Original Poster, Most Recent Poster",975            "user": {976              "id": 82744,977              "username": "Maria_Djeblahi",978              "name": "Maria Djeblahi",979              "avatar_template": "/user_avatar/discuss.pytorch.org/maria_djeblahi/{size}/75704_2.png",980              "trust_level": 1981            }982          },983          {984            "extras": null,985            "description": "Frequent Poster",986            "user": {987              "id": 3534,988              "username": "ptrblck",989              "name": "",990              "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",991              "admin": true,992              "moderator": true,993              "trust_level": 2994            }995          }996        ]997      }998    ],999    "tags_descriptions": {},1000    "fancy_title": "Data Loading using Pytorch",1001    "id": 190254,1002    "title": "Data Loading using Pytorch",1003    "posts_count": 2,1004    "created_at": "2023-10-19T03:23:13.699Z",1005    "views": 377,1006    "reply_count": 0,1007    "like_count": 0,1008    "last_posted_at": "2023-10-19T15:43:01.497Z",1009    "visible": true,1010    "closed": false,1011    "archived": false,1012    "has_summary": false,1013    "archetype": "regular",1014    "slug": "data-loading-using-pytorch",1015    "category_id": 37,1016    "word_count": 495,1017    "deleted_at": null,1018    "user_id": 70254,1019    "featured_link": null,1020    "pinned_globally": false,1021    "pinned_at": null,1022    "pinned_until": null,1023    "image_url": null,1024    "slow_mode_seconds": 0,1025    "draft": null,1026    "draft_key": "topic_190254",1027    "draft_sequence": null,1028    "unpinned": null,1029    "pinned": false,1030    "current_post_number": 1,1031    "highest_post_number": 2,1032    "deleted_by": null,1033    "actions_summary": [1034      {1035        "id": 4,1036        "count": 0,1037        "hidden": false,1038        "can_act": false1039      },1040      {1041        "id": 8,1042        "count": 0,1043        "hidden": false,1044        "can_act": false1045      },1046      {1047        "id": 10,1048        "count": 0,1049        "hidden": false,1050        "can_act": false1051      },1052      {1053        "id": 7,1054        "count": 0,1055        "hidden": false,1056        "can_act": false1057      }1058    ],1059    "chunk_size": 20,1060    "bookmarked": false,1061    "topic_timer": null,1062    "message_bus_last_id": 0,1063    "participant_count": 2,1064    "show_read_indicator": false,1065    "thumbnails": null,1066    "slow_mode_enabled_until": null,1067    "can_vote": false,1068    "vote_count": 0,1069    "user_voted": false,1070    "discourse_zendesk_plugin_zendesk_id": null,1071    "discourse_zendesk_plugin_zendesk_url": "https://your-url.zendesk.com/agent/tickets/",1072    "details": {1073      "can_edit": false,1074      "notification_level": 1,1075      "participants": [1076        {1077          "id": 70254,1078          "username": "Aniruth_Sundararajan",1079          "name": "Aniruth Sundararajan",1080          "avatar_template": "/user_avatar/discuss.pytorch.org/aniruth_sundararajan/{size}/63308_2.png",1081          "post_count": 1,1082          "primary_group_name": null,1083          "flair_name": null,1084          "flair_url": null,1085          "flair_color": null,1086          "flair_bg_color": null,1087          "flair_group_id": null,1088          "trust_level": 01089        },1090        {1091          "id": 70274,1092          "username": "Roopali_Bhavanasi",1093          "name": "Roopali Bhavanasi",1094          "avatar_template": "/user_avatar/discuss.pytorch.org/roopali_bhavanasi/{size}/61570_2.png",1095          "post_count": 1,1096          "primary_group_name": null,1097          "flair_name": null,1098          "flair_url": null,1099          "flair_color": null,1100          "flair_bg_color": null,1101          "flair_group_id": null,1102          "trust_level": 01103        }1104      ],1105      "created_by": {1106        "id": 70254,1107        "username": "Aniruth_Sundararajan",1108        "name": "Aniruth Sundararajan",1109        "avatar_template": "/user_avatar/discuss.pytorch.org/aniruth_sundararajan/{size}/63308_2.png"1110      },1111      "last_poster": {1112        "id": 70274,1113        "username": "Roopali_Bhavanasi",1114        "name": "Roopali Bhavanasi",1115        "avatar_template": "/user_avatar/discuss.pytorch.org/roopali_bhavanasi/{size}/61570_2.png"1116      }1117    },1118    "bookmarks": []1119  },1120  {1121    "post_stream": {1122      "posts": [1123        {1124          "id": 420825,1125          "name": "",1126          "username": "yxz77777",1127          "avatar_template": "/letter_avatar_proxy/v4/letter/y/6bbea6/{size}.png",1128          "created_at": "2023-10-18T13:26:57.317Z",1129          "cooked": "<p><strong>My algorithm is DDPG, and my actor network is unable to backpropagate. How should I handle this issue?</strong><br>\nclass ActorNet(nn.Module):<br>\ndef <strong>init</strong>(self):<br>\nsuper(ActorNet, self).<strong>init</strong>()<br>\ninit_w = 1e-3<br>\nself.input_size = 3<br>\nself.output_size = 1 + 1<br>\nself.fc1 = nn.Linear(self.input_size, HIDDEN_SIZE_1)<br>\nself.fc2 = nn.Linear(HIDDEN_SIZE_1, HIDDEN_SIZE_2)<br>\nself.fc3 = nn.Linear(HIDDEN_SIZE_2, self.output_size)</p>\n<pre><code>    init.kaiming_uniform_(self.fc1.weight)\n    init.kaiming_uniform_(self.fc2.weight)\n    init.kaiming_uniform_(self.fc3.weight)\n\n\ndef forward(self, x):\n    x = self.fc1(x)\n    x = torch.relu(x)\n    x = self.fc2(x)\n    x = torch.relu(x)\n    x = self.fc3(x)\n    x = torch.relu(x)\n    return x\n</code></pre>\n<p><strong>this is my actor-net frame,and the update is below</strong><br>\nstate, action, reward, next_state = self.memory.sample(self.batch_size)<br>\nstate_batch = torch.FloatTensor(np.array(state))<br>\naction_batch = torch.FloatTensor(np.array(action))<br>\nreward_batch = torch.FloatTensor(reward).unsqueeze(1)<br>\nnext_state_batch = torch.FloatTensor(np.array(next_state))<br>\nstate_actor_batch = torch.cat((state_batch, action_batch), 1)<br>\npolicy_Q = torch.mean(self.critic(state_actor_batch))<br>\nactor_loss = -policy_Q<br>\nself.actor_optimizer.zero_grad()<br>\ntorch.nn.utils.clip_grad_norm_(self.actor.parameters(), 1)<br>\nactor_loss.backward(retain_graph=True)<br>\nself.actor_optimizer.step()<br>\nand my optim is<br>\nself.actor_optimizer = optim.Adam(self.actor.parameters(), lr=1e-3, weight_decay=1e-5)</p>",1130          "post_number": 1,1131          "post_type": 1,1132          "posts_count": 8,1133          "updated_at": "2023-10-18T13:50:48.420Z",1134          "reply_count": 0,1135          "reply_to_post_number": null,1136          "quote_count": 0,1137          "incoming_link_count": 52,1138          "reads": 11,1139          "readers_count": 10,1140          "score": 262.2,1141          "yours": false,1142          "topic_id": 190201,1143          "topic_slug": "backward-error-in-ddpg",1144          "display_username": "",1145          "primary_group_name": null,1146          "flair_name": null,1147          "flair_url": null,1148          "flair_bg_color": null,1149          "flair_color": null,1150          "flair_group_id": null,1151          "badges_granted": [],1152          "version": 2,1153          "can_edit": false,1154          "can_delete": false,1155          "can_recover": false,1156          "can_see_hidden_post": false,1157          "can_wiki": false,1158          "read": true,1159          "user_title": null,1160          "bookmarked": false,1161          "actions_summary": [],1162          "moderator": false,1163          "admin": false,1164          "staff": false,1165          "user_id": 70238,1166          "hidden": false,1167          "trust_level": 1,1168          "deleted_at": null,1169          "user_deleted": false,1170          "edit_reason": null,1171          "can_view_edit_history": true,1172          "wiki": false,1173          "post_url": "/t/backward-error-in-ddpg/190201/1",1174          "can_accept_answer": false,1175          "can_unaccept_answer": false,1176          "accepted_answer": false,1177          "topic_accepted_answer": true,1178          "can_vote": false1179        },1180        {1181          "id": 420880,1182          "name": "",1183          "username": "ptrblck",1184          "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",1185          "created_at": "2023-10-18T17:43:52.573Z",1186          "cooked": "<p>I don’t know what the error is but often using <code>retain_graph=True</code> is wrong and causes issues trying to calculate gradients from stale forward activations, so could you explain why this argument is used?</p>",1187          "post_number": 2,1188          "post_type": 1,1189          "posts_count": 8,1190          "updated_at": "2023-10-18T17:43:52.573Z",1191          "reply_count": 1,1192          "reply_to_post_number": null,1193          "quote_count": 0,1194          "incoming_link_count": 2,1195          "reads": 7,1196          "readers_count": 6,1197          "score": 31.4,1198          "yours": false,1199          "topic_id": 190201,1200          "topic_slug": "backward-error-in-ddpg",

Showing the first 1,200 of 62338 lines. Download the file for the rest.