CoolFace
Datasetpublic

Anurag1734/cuda-error-resolution-analysis

sourceHugging Faceupdated 2mo agoView on Hugging Face
0likes7downloads
topics_batch_54.json61000 linesDownload Raw Back to raw
1[2  {3    "post_stream": {4      "posts": [5        {6          "id": 445956,7          "name": "",8          "username": "jawi289p",9          "avatar_template": "/user_avatar/discuss.pytorch.org/jawi289p/{size}/61673_2.png",10          "created_at": "2024-06-14T19:17:24.331Z",11          "cooked": "<p>I am training a model for multiclass segmentation problem. I have 3 classes with image size of 512x512 and 1 channel. My dataset has imbalanced classes. The issue is that the model is not performing well for the multiclass segmentation.</p>\n<p>I have tried with Cross Entropy Loss, Dice Loss, Jaccard Loss, and combination of Losses (Jaccard + Focal).<br>\nCross Entropy is working fine but results are not satisfactory.</p>\n<p>What changes should I made in it?</p>\n<p>Below is the code of the model</p>\n<pre><code class=\"lang-auto\">class AxialDW(nn.Module):\n    def __init__(self, dim, mixer_kernel, dilation=1):\n        super().__init__()\n        h, w = mixer_kernel\n        self.dw_h = nn.Conv2d(dim, dim, kernel_size=(h, 1), padding=(max(h // 2, dilation), 0), groups=dim, dilation=dilation)\n        self.dw_w = nn.Conv2d(dim, dim, kernel_size=(1, w), padding=(0, max(w // 2, dilation)), groups=dim, dilation=dilation)\n\n    def forward(self, x):\n        x = x + self.dw_h(x) + self.dw_w(x)\n        return x\n\n\nclass EncoderBlock(nn.Module):\n    \"\"\"Encoding then downsampling\"\"\"\n\n    def __init__(self, in_c, out_c, mixer_kernel=(7, 7)):\n        super().__init__()\n        self.dw = AxialDW(in_c, mixer_kernel=(7, 7))\n        self.bn = nn.BatchNorm2d(in_c)\n        self.pw = nn.Conv2d(in_c, out_c, kernel_size=1)\n        self.down = nn.MaxPool2d((2, 2))\n        self.act = nn.GELU()\n\n    def forward(self, x):\n        skip = self.bn(self.dw(x))\n        x = self.act(self.down(self.pw(skip)))\n        return x, skip\n\n\nclass DecoderBlock(nn.Module):\n    \"\"\"Upsampling then decoding\"\"\"\n\n    def __init__(self, in_c, out_c, mixer_kernel=(7, 7)):\n        super().__init__()\n        self.up = nn.Upsample(scale_factor=2)\n        self.pw = nn.Conv2d(in_c + out_c, out_c, kernel_size=1)\n        self.bn = nn.BatchNorm2d(out_c)\n        self.dw = AxialDW(out_c, mixer_kernel=(7, 7))\n        self.act = nn.GELU()\n        self.pw2 = nn.Conv2d(out_c, out_c, kernel_size=1)\n\n    def forward(self, x, skip):\n        x = self.up(x)\n        x = torch.cat([x, skip], dim=1)\n        x = self.act(self.pw2(self.dw(self.bn(self.pw(x)))))\n        return x\n\n\nclass BottleNeckBlock(nn.Module):\n    \"\"\"Axial dilated DW convolution\"\"\"\n\n    def __init__(self, dim):\n        super().__init__()\n\n        gc = dim // 4\n        self.pw1 = nn.Conv2d(dim, gc, kernel_size=1)\n        self.dw1 = AxialDW(gc, mixer_kernel=(3, 3), dilation=1)\n        self.dw2 = AxialDW(gc, mixer_kernel=(3, 3), dilation=2)\n        self.dw3 = AxialDW(gc, mixer_kernel=(3, 3), dilation=3)\n\n        self.bn = nn.BatchNorm2d(4 * gc)\n        self.pw2 = nn.Conv2d(4 * gc, dim, kernel_size=1)\n        self.act = nn.GELU()\n\n    def forward(self, x):\n        x = self.pw1(x)\n        x = torch.cat([x, self.dw1(x), self.dw2(x), self.dw3(x)], 1)\n        x = self.act(self.pw2(self.bn(x)))\n        return x\n\n\nclass ULite(nn.Module):\n    def __init__(self, freeze_model, num_classes=3):\n        super().__init__()\n\n        \"\"\"Encoder\"\"\"\n        self.conv_in = nn.Conv2d(1, 16, kernel_size=7, padding=3)\n        self.e1 = EncoderBlock(16, 32)\n        self.e2 = EncoderBlock(32, 64)\n        self.e3 = EncoderBlock(64, 128)\n        self.e4 = EncoderBlock(128, 256)\n        self.e5 = EncoderBlock(256, 512)\n\n        \"\"\"Bottle Neck\"\"\"\n        self.b5 = BottleNeckBlock(512)\n\n        \"\"\"Decoder\"\"\"\n        self.d5 = DecoderBlock(512, 256)\n        self.d4 = DecoderBlock(256, 128)\n        self.d3 = DecoderBlock(128, 64)\n        self.d2 = DecoderBlock(64, 32)\n        self.d1 = DecoderBlock(32, 16)\n        self.conv_out = nn.Conv2d(16, num_classes, kernel_size=1)\n\n        if freeze_model:\n            self.freeze_model()\n\n    def forward(self, x):\n        \"\"\"Encoder\"\"\"\n        x = self.conv_in(x)\n        x, skip1 = self.e1(x)\n        x, skip2 = self.e2(x)\n        x, skip3 = self.e3(x)\n        x, skip4 = self.e4(x)\n        x, skip5 = self.e5(x)\n\n        \"\"\"BottleNeck\"\"\"\n        x = self.b5(x)  # (512, 8, 8)\n\n        \"\"\"Decoder\"\"\"\n        x = self.d5(x, skip5)\n        x = self.d4(x, skip4)\n        x = self.d3(x, skip3)\n        x = self.d2(x, skip2)\n        x = self.d1(x, skip1)\n        x = self.conv_out(x)\n\n                # Apply softmax for multi-class classification\n        x = F.softmax(x, dim=1)\n        return x\n\n    def freeze_model(self):\n        for name, param in self.named_parameters():\n            param.requires_grad = False\n\n</code></pre>\n<p>Jaccard + Focal Loss<br>\n<img src=\"https://discuss.pytorch.org/uploads/default/original/3X/f/b/fb3408aa3d0e80d808d19f9484677ce864a79d24.png\" alt=\"jacc+focalloss\" data-base62-sha1=\"zQfkhk197xCsVZuPaVUDdoUWfD6\" width=\"576\" height=\"455\"></p>\n<p>Jaccard Loss<br>\n<img src=\"https://discuss.pytorch.org/uploads/default/original/3X/1/3/132e962fac0d684dddfa62a85a2b02f4a5c8591e.png\" alt=\"jaccardloss\" data-base62-sha1=\"2JGSLOOnRdMHoA7dZrC30bFriJo\" width=\"580\" height=\"455\"></p>",12          "post_number": 1,13          "post_type": 1,14          "posts_count": 6,15          "updated_at": "2024-06-14T19:17:24.331Z",16          "reply_count": 1,17          "reply_to_post_number": null,18          "quote_count": 0,19          "incoming_link_count": 21,20          "reads": 12,21          "readers_count": 11,22          "score": 112.4,23          "yours": false,24          "topic_id": 204675,25          "topic_slug": "model-not-working-for-multiclass-segmentation",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          "read": true,41          "user_title": null,42          "bookmarked": false,43          "actions_summary": [],44          "moderator": false,45          "admin": false,46          "staff": false,47          "user_id": 75241,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/model-not-working-for-multiclass-segmentation/204675/1",56          "can_accept_answer": false,57          "can_unaccept_answer": false,58          "accepted_answer": false,59          "topic_accepted_answer": null,60          "can_vote": false61        },62        {63          "id": 445965,64          "name": "",65          "username": "ptrblck",66          "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",67          "created_at": "2024-06-14T21:21:09.017Z",68          "cooked": "<aside class=\"quote no-group\" data-username=\"jawi289p\" data-post=\"1\" data-topic=\"204675\">\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/jawi289p/48/61673_2.png\" class=\"avatar\"> jawi289p:</div>\n<blockquote>\n<pre><code class=\"lang-auto\">                # Apply softmax for multi-class classification\n        x = F.softmax(x, dim=1)\n</code></pre>\n</blockquote>\n</aside>\n<p>Remove the <code>F.softmax</code> call if you are using <code>nn.CrossEntropyLoss</code> as this criterion expects raw logits.</p>",69          "post_number": 2,70          "post_type": 1,71          "posts_count": 6,72          "updated_at": "2024-06-14T21:21:09.017Z",73          "reply_count": 1,74          "reply_to_post_number": null,75          "quote_count": 1,76          "incoming_link_count": 0,77          "reads": 10,78          "readers_count": 9,79          "score": 7.0,80          "yours": false,81          "topic_id": 204675,82          "topic_slug": "model-not-working-for-multiclass-segmentation",83          "display_username": "",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": "",99          "bookmarked": false,100          "actions_summary": [],101          "moderator": true,102          "admin": true,103          "staff": true,104          "user_id": 3534,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/model-not-working-for-multiclass-segmentation/204675/2",113          "can_accept_answer": false,114          "can_unaccept_answer": false,115          "accepted_answer": false,116          "topic_accepted_answer": null117        },118        {119          "id": 445979,120          "name": "",121          "username": "jawi289p",122          "avatar_template": "/user_avatar/discuss.pytorch.org/jawi289p/{size}/61673_2.png",123          "created_at": "2024-06-15T09:51:08.749Z",124          "cooked": "<p><a class=\"mention\" href=\"/u/ptrblck\">@ptrblck</a> As I told earlier, Cross Entropy is working fine but results are not satisfactory. IoU scores for two classes are coming very low. My images are too complex. What should I do now?</p>\n<p><img src=\"https://discuss.pytorch.org/uploads/default/original/3X/8/e/8ee9ba662f8114b9e9d8e7f19927de5639a4ffc2.png\" alt=\"crossentropy\" data-base62-sha1=\"kogyMsPTh1aN5D1vn0Dqc1Hp4EW\" width=\"567\" height=\"455\"></p>",125          "post_number": 3,126          "post_type": 1,127          "posts_count": 6,128          "updated_at": "2024-06-15T09:51:08.749Z",129          "reply_count": 1,130          "reply_to_post_number": 2,131          "quote_count": 0,132          "incoming_link_count": 0,133          "reads": 10,134          "readers_count": 9,135          "score": 7.0,136          "yours": false,137          "topic_id": 204675,138          "topic_slug": "model-not-working-for-multiclass-segmentation",139          "display_username": "",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          "reply_to_user": {156            "id": 3534,157            "username": "ptrblck",158            "name": "",159            "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png"160          },161          "bookmarked": false,162          "actions_summary": [],163          "moderator": false,164          "admin": false,165          "staff": false,166          "user_id": 75241,167          "hidden": false,168          "trust_level": 1,169          "deleted_at": null,170          "user_deleted": false,171          "edit_reason": null,172          "can_view_edit_history": true,173          "wiki": false,174          "post_url": "/t/model-not-working-for-multiclass-segmentation/204675/3",175          "can_accept_answer": false,176          "can_unaccept_answer": false,177          "accepted_answer": false,178          "topic_accepted_answer": null179        },180        {181          "id": 445987,182          "name": "",183          "username": "ptrblck",184          "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",185          "created_at": "2024-06-15T13:47:59.405Z",186          "cooked": "<p>Your code contains an error and you are passing probabilities into a criterion which expects raw logits. I’m unsure how</p>\n<aside class=\"quote no-group\" data-username=\"jawi289p\" data-post=\"3\" data-topic=\"204675\">\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/jawi289p/48/61673_2.png\" class=\"avatar\"> jawi289p:</div>\n<blockquote>\n<p>As I told earlier, Cross Entropy is working fine</p>\n</blockquote>\n</aside>\n<p>is relevant. Did you fix your code based on my previous post? If so, did you see any improvement? If not, why not?</p>",187          "post_number": 4,188          "post_type": 1,189          "posts_count": 6,190          "updated_at": "2024-06-15T13:47:59.405Z",191          "reply_count": 1,192          "reply_to_post_number": 3,193          "quote_count": 1,194          "incoming_link_count": 0,195          "reads": 9,196          "readers_count": 8,197          "score": 6.8,198          "yours": false,199          "topic_id": 204675,200          "topic_slug": "model-not-working-for-multiclass-segmentation",201          "display_username": "",202          "primary_group_name": null,203          "flair_name": null,204          "flair_url": null,205          "flair_bg_color": null,206          "flair_color": null,207          "flair_group_id": null,208          "badges_granted": [],209          "version": 1,210          "can_edit": false,211          "can_delete": false,212          "can_recover": false,213          "can_see_hidden_post": false,214          "can_wiki": false,215          "read": true,216          "user_title": "",217          "bookmarked": false,218          "actions_summary": [],219          "moderator": true,220          "admin": true,221          "staff": true,222          "user_id": 3534,223          "hidden": false,224          "trust_level": 2,225          "deleted_at": null,226          "user_deleted": false,227          "edit_reason": null,228          "can_view_edit_history": true,229          "wiki": false,230          "post_url": "/t/model-not-working-for-multiclass-segmentation/204675/4",231          "can_accept_answer": false,232          "can_unaccept_answer": false,233          "accepted_answer": false,234          "topic_accepted_answer": null235        },236        {237          "id": 445990,238          "name": "",239          "username": "jawi289p",240          "avatar_template": "/user_avatar/discuss.pytorch.org/jawi289p/{size}/61673_2.png",241          "created_at": "2024-06-15T15:06:18.711Z",242          "cooked": "<p><a class=\"mention\" href=\"/u/ptrblck\">@ptrblck</a> yes I have tried by removing x = F.softmax(x, dim=1) in my model and then trained it. The train and validation curves I shared in my last post belonged to it.<br>\nThe scores are almost the same as they were before I removed the code.</p>",243          "post_number": 5,244          "post_type": 1,245          "posts_count": 6,246          "updated_at": "2024-06-15T15:06:18.711Z",247          "reply_count": 1,248          "reply_to_post_number": 4,249          "quote_count": 0,250          "incoming_link_count": 1,251          "reads": 8,252          "readers_count": 7,253          "score": 11.6,254          "yours": false,255          "topic_id": 204675,256          "topic_slug": "model-not-working-for-multiclass-segmentation",257          "display_username": "",258          "primary_group_name": null,259          "flair_name": null,260          "flair_url": null,261          "flair_bg_color": null,262          "flair_color": null,263          "flair_group_id": null,264          "badges_granted": [],265          "version": 1,266          "can_edit": false,267          "can_delete": false,268          "can_recover": false,269          "can_see_hidden_post": false,270          "can_wiki": false,271          "read": true,272          "user_title": null,273          "reply_to_user": {274            "id": 3534,275            "username": "ptrblck",276            "name": "",277            "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png"278          },279          "bookmarked": false,280          "actions_summary": [],281          "moderator": false,282          "admin": false,283          "staff": false,284          "user_id": 75241,285          "hidden": false,286          "trust_level": 1,287          "deleted_at": null,288          "user_deleted": false,289          "edit_reason": null,290          "can_view_edit_history": true,291          "wiki": false,292          "post_url": "/t/model-not-working-for-multiclass-segmentation/204675/5",293          "can_accept_answer": false,294          "can_unaccept_answer": false,295          "accepted_answer": false,296          "topic_accepted_answer": null297        },298        {299          "id": 445991,300          "name": "",301          "username": "ptrblck",302          "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",303          "created_at": "2024-06-15T15:22:23.491Z",304          "cooked": "<p>Could you describe what kind of issues are you seeing? Is the model overfitting to the majority class? If so, could you describe the class imbalance and did you try to add class weights to the criterion?</p>",305          "post_number": 6,306          "post_type": 1,307          "posts_count": 6,308          "updated_at": "2024-06-15T15:22:23.491Z",309          "reply_count": 0,310          "reply_to_post_number": 5,311          "quote_count": 0,312          "incoming_link_count": 2,313          "reads": 8,314          "readers_count": 7,315          "score": 11.6,316          "yours": false,317          "topic_id": 204675,318          "topic_slug": "model-not-working-for-multiclass-segmentation",319          "display_username": "",320          "primary_group_name": null,321          "flair_name": null,322          "flair_url": null,323          "flair_bg_color": null,324          "flair_color": null,325          "flair_group_id": null,326          "badges_granted": [],327          "version": 1,328          "can_edit": false,329          "can_delete": false,330          "can_recover": false,331          "can_see_hidden_post": false,332          "can_wiki": false,333          "read": true,334          "user_title": "",335          "reply_to_user": {336            "id": 75241,337            "username": "jawi289p",338            "name": "",339            "avatar_template": "/user_avatar/discuss.pytorch.org/jawi289p/{size}/61673_2.png"340          },341          "bookmarked": false,342          "actions_summary": [],343          "moderator": true,344          "admin": true,345          "staff": true,346          "user_id": 3534,347          "hidden": false,348          "trust_level": 2,349          "deleted_at": null,350          "user_deleted": false,351          "edit_reason": null,352          "can_view_edit_history": true,353          "wiki": false,354          "post_url": "/t/model-not-working-for-multiclass-segmentation/204675/6",355          "can_accept_answer": false,356          "can_unaccept_answer": false,357          "accepted_answer": false,358          "topic_accepted_answer": null359        }360      ],361      "stream": [362        445956,363        445965,364        445979,365        445987,366        445990,367        445991368      ]369    },370    "timeline_lookup": [371      [372        1,373        498374      ],375      [376        3,377        497378      ]379    ],380    "suggested_topics": [381      {382        "fancy_title": "No errors before saving, but an error during testing",383        "id": 212388,384        "title": "No errors before saving, but an error during testing",385        "slug": "no-errors-before-saving-but-an-error-during-testing",386        "posts_count": 8,387        "reply_count": 2,388        "highest_post_number": 8,389        "image_url": null,390        "created_at": "2024-11-01T03:04:03.812Z",391        "last_posted_at": "2024-11-10T14:54:52.243Z",392        "bumped": true,393        "bumped_at": "2024-11-10T14:54:52.243Z",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": 60,406        "category_id": 1,407        "featured_link": null,408        "has_accepted_answer": true,409        "posters": [410          {411            "extras": "latest",412            "description": "Original Poster, Most Recent Poster, Accepted Answer",413            "user": {414              "id": 80199,415              "username": "Mathews_Vinoy",416              "name": "Mathews Vinoy",417              "avatar_template": "/user_avatar/discuss.pytorch.org/mathews_vinoy/{size}/73319_2.png",418              "trust_level": 1419            }420          },421          {422            "extras": null,423            "description": "Frequent Poster",424            "user": {425              "id": 3534,426              "username": "ptrblck",427              "name": "",428              "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",429              "admin": true,430              "moderator": true,431              "trust_level": 2432            }433          }434        ]435      },436      {437        "fancy_title": "Numpy is not avaiable when transfrom Torch tensor to numpy",438        "id": 213214,439        "title": "Numpy is not avaiable when transfrom Torch tensor to numpy",440        "slug": "numpy-is-not-avaiable-when-transfrom-torch-tensor-to-numpy",441        "posts_count": 2,442        "reply_count": 0,443        "highest_post_number": 2,444        "image_url": null,445        "created_at": "2024-11-20T16:23:48.805Z",446        "last_posted_at": "2024-11-20T21:45:13.447Z",447        "bumped": true,448        "bumped_at": "2024-11-20T21:45:13.447Z",449        "archetype": "regular",450        "unseen": false,451        "pinned": false,452        "unpinned": null,453        "visible": true,454        "closed": false,455        "archived": false,456        "bookmarked": null,457        "liked": null,458        "tags_descriptions": {},459        "like_count": 0,460        "views": 178,461        "category_id": 1,462        "featured_link": null,463        "has_accepted_answer": false,464        "posters": [465          {466            "extras": null,467            "description": "Original Poster",468            "user": {469              "id": 55933,470              "username": "miraboreasu",471              "name": "",472              "avatar_template": "/letter_avatar_proxy/v4/letter/m/6bbea6/{size}.png",473              "trust_level": 1474            }475          },476          {477            "extras": "latest",478            "description": "Most Recent Poster",479            "user": {480              "id": 3534,481              "username": "ptrblck",482              "name": "",483              "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",484              "admin": true,485              "moderator": true,486              "trust_level": 2487            }488          }489        ]490      },491      {492        "fancy_title": "I met strange error when train rwkv",493        "id": 214360,494        "title": "I met strange error when train rwkv",495        "slug": "i-met-strange-error-when-train-rwkv",496        "posts_count": 9,497        "reply_count": 7,498        "highest_post_number": 9,499        "image_url": null,500        "created_at": "2024-12-18T13:10:15.024Z",501        "last_posted_at": "2024-12-19T03:10:04.653Z",502        "bumped": true,503        "bumped_at": "2024-12-19T03:10:04.653Z",504        "archetype": "regular",505        "unseen": false,506        "pinned": false,507        "unpinned": null,508        "visible": true,509        "closed": false,510        "archived": false,511        "bookmarked": null,512        "liked": null,513        "tags_descriptions": {},514        "like_count": 0,515        "views": 165,516        "category_id": 1,517        "featured_link": null,518        "has_accepted_answer": false,519        "posters": [520          {521            "extras": null,522            "description": "Original Poster",523            "user": {524              "id": 81570,525              "username": "ddddewang0425",526              "name": "ddddewang0425",527              "avatar_template": "/user_avatar/discuss.pytorch.org/ddddewang0425/{size}/74590_2.png",528              "trust_level": 0529            }530          },531          {532            "extras": "latest",533            "description": "Most Recent Poster",534            "user": {535              "id": 3534,536              "username": "ptrblck",537              "name": "",538              "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",539              "admin": true,540              "moderator": true,541              "trust_level": 2542            }543          }544        ]545      },546      {547        "fancy_title": "Why OneCycleLR stores part of variables in optimizer groups",548        "id": 213114,549        "title": "Why OneCycleLR stores part of variables in optimizer groups",550        "slug": "why-onecyclelr-stores-part-of-variables-in-optimizer-groups",551        "posts_count": 1,552        "reply_count": 0,553        "highest_post_number": 1,554        "image_url": null,555        "created_at": "2024-11-18T13:51:06.706Z",556        "last_posted_at": "2024-11-18T13:51:06.751Z",557        "bumped": true,558        "bumped_at": "2024-11-19T00:17:38.548Z",559        "archetype": "regular",560        "unseen": false,561        "pinned": false,562        "unpinned": null,563        "visible": true,564        "closed": false,565        "archived": false,566        "bookmarked": null,567        "liked": null,568        "tags_descriptions": {},569        "like_count": 1,570        "views": 115,571        "category_id": 1,572        "featured_link": null,573        "has_accepted_answer": false,574        "posters": [575          {576            "extras": "latest single",577            "description": "Original Poster, Most Recent Poster",578            "user": {579              "id": 80985,580              "username": "mombip",581              "name": "",582              "avatar_template": "/user_avatar/discuss.pytorch.org/mombip/{size}/74062_2.png",583              "trust_level": 0584            }585          }586        ]587      },588      {589        "fancy_title": "Stateful LSTM problem with last batch",590        "id": 216714,591        "title": "Stateful LSTM problem with last batch",592        "slug": "stateful-lstm-problem-with-last-batch",593        "posts_count": 1,594        "reply_count": 0,595        "highest_post_number": 1,596        "image_url": null,597        "created_at": "2025-02-15T15:22:05.916Z",598        "last_posted_at": "2025-02-15T15:22:05.956Z",599        "bumped": true,600        "bumped_at": "2025-02-15T15:22:05.956Z",601        "archetype": "regular",602        "unseen": false,603        "pinned": false,604        "unpinned": null,605        "visible": true,606        "closed": false,607        "archived": false,608        "bookmarked": null,609        "liked": null,610        "tags_descriptions": {},611        "like_count": 0,612        "views": 72,613        "category_id": 1,614        "featured_link": null,615        "has_accepted_answer": false,616        "posters": [617          {618            "extras": "latest single",619            "description": "Original Poster, Most Recent Poster",620            "user": {621              "id": 82707,622              "username": "sava_delchev",623              "name": "sava delchev",624              "avatar_template": "/user_avatar/discuss.pytorch.org/sava_delchev/{size}/75671_2.png",625              "trust_level": 1626            }627          }628        ]629      }630    ],631    "tags_descriptions": {},632    "fancy_title": "Model not working for Multiclass Segmentation",633    "id": 204675,634    "title": "Model not working for Multiclass Segmentation",635    "posts_count": 6,636    "created_at": "2024-06-14T19:17:24.209Z",637    "views": 189,638    "reply_count": 5,639    "like_count": 0,640    "last_posted_at": "2024-06-15T15:22:23.491Z",641    "visible": true,642    "closed": false,643    "archived": false,644    "has_summary": false,645    "archetype": "regular",646    "slug": "model-not-working-for-multiclass-segmentation",647    "category_id": 1,648    "word_count": 832,649    "deleted_at": null,650    "user_id": 75241,651    "featured_link": null,652    "pinned_globally": false,653    "pinned_at": null,654    "pinned_until": null,655    "image_url": "https://discuss.pytorch.org/uploads/default/original/3X/f/b/fb3408aa3d0e80d808d19f9484677ce864a79d24.png",656    "slow_mode_seconds": 0,657    "draft": null,658    "draft_key": "topic_204675",659    "draft_sequence": null,660    "unpinned": null,661    "pinned": false,662    "current_post_number": 1,663    "highest_post_number": 6,664    "deleted_by": null,665    "actions_summary": [666      {667        "id": 4,668        "count": 0,669        "hidden": false,670        "can_act": false671      },672      {673        "id": 8,674        "count": 0,675        "hidden": false,676        "can_act": false677      },678      {679        "id": 10,680        "count": 0,681        "hidden": false,682        "can_act": false683      },684      {685        "id": 7,686        "count": 0,687        "hidden": false,688        "can_act": false689      }690    ],691    "chunk_size": 20,692    "bookmarked": false,693    "topic_timer": null,694    "message_bus_last_id": 0,695    "participant_count": 2,696    "show_read_indicator": false,697    "thumbnails": [698      {699        "max_width": null,700        "max_height": null,701        "width": 576,702        "height": 455,703        "url": "https://discuss.pytorch.org/uploads/default/original/3X/f/b/fb3408aa3d0e80d808d19f9484677ce864a79d24.png"704      }705    ],706    "slow_mode_enabled_until": null,707    "can_vote": false,708    "vote_count": 0,709    "user_voted": false,710    "discourse_zendesk_plugin_zendesk_id": null,711    "discourse_zendesk_plugin_zendesk_url": "https://your-url.zendesk.com/agent/tickets/",712    "details": {713      "can_edit": false,714      "notification_level": 1,715      "participants": [716        {717          "id": 3534,718          "username": "ptrblck",719          "name": "",720          "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",721          "post_count": 3,722          "primary_group_name": null,723          "flair_name": null,724          "flair_url": null,725          "flair_color": null,726          "flair_bg_color": null,727          "flair_group_id": null,728          "admin": true,729          "moderator": true,730          "trust_level": 2731        },732        {733          "id": 75241,734          "username": "jawi289p",735          "name": "",736          "avatar_template": "/user_avatar/discuss.pytorch.org/jawi289p/{size}/61673_2.png",737          "post_count": 3,738          "primary_group_name": null,739          "flair_name": null,740          "flair_url": null,741          "flair_color": null,742          "flair_bg_color": null,743          "flair_group_id": null,744          "trust_level": 1745        }746      ],747      "created_by": {748        "id": 75241,749        "username": "jawi289p",750        "name": "",751        "avatar_template": "/user_avatar/discuss.pytorch.org/jawi289p/{size}/61673_2.png"752      },753      "last_poster": {754        "id": 3534,755        "username": "ptrblck",756        "name": "",757        "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png"758      }759    },760    "bookmarks": []761  },762  {763    "post_stream": {764      "posts": [765        {766          "id": 446213,767          "name": "",768          "username": "YM2132",769          "avatar_template": "/user_avatar/discuss.pytorch.org/ym2132/{size}/70814_2.png",770          "created_at": "2024-06-18T07:41:48.733Z",771          "cooked": "<p>I am trying to implement the PGGAN and have the following code for my discriminator model:</p>\n<pre><code class=\"lang-auto\"># New D model\nclass Discriminator(nn.Module):\n    def __init__(self):\n        super().__init__()\n                \n        # First conv corresponds to fromRGB\n        self.fromRGB = None\n        #self.fromRGB = from_to_RGB(in_channels=3, out_channels=16)\n        \n        self.block1 = None\n        self.block2 = None\n        self.block3 = None\n        self.block4 = None\n        self.block5 = None\n        self.block6 = None\n        self.block7 = None\n        # If none we add the model in the forward pass? \n        # issue remains of last layer and the FC layer\n        \n        # Now let's try and do this dynamically using a list?\n        \n        \n        # FC output layer\n        # I will hardcode the different FC layers\n        self.FC1 = None\n        \n        # The output sigmoid\n        self.sigmoid = nn.Sigmoid()\n        \n    # We can use this method to reset the FC layer after we complete training for each block\n    def reset_output_layer(self):\n        self.FC1 = None\n    \n    def set_fromRGB(self):\n        self.fromRGB = None\n        \n    # def activate_layer(self, layer)  Perhaps this is a better way to init the layers?\n    \n    def forward(self, x, layer_num=1, alpha=0):\n        # This is the fromRGB transform\n        #print(x.shape)\n        \n        # For now, instead of inferring the number of input channels expected by the layer after fromRGB\n        # Let's hardcode it with a list and we will reinitialise the fromRGB layer each time we grow the network\n        # until we reach layer 7 at which point fromRGB will be locked in\n        expected_channels = [512, 512, 256, 128, 64, 32, 16]\n        if alpha == 0:\n            self.fromRGB = None\n            self.fromRGB = from_to_RGB(in_channels=3, out_channels=expected_channels[layer_num-1]).to(x.device)\n        x = self.fromRGB(x)\n        \n        #if layer_num == 3:\n            #print(f'X after fromRGB: {x.shape}')\n        \n        # Block 7\n        if layer_num &gt;= 7:\n            #print(\"BLOCK 7 ACTIVE\")\n            if self.block1 is None:\n                self.block1 = d_conv_block(in_channels=16, out_channels=32, kernel_size1=(3,3)).to(x.device)\n            x = self.block1(x)    \n        # Block 6\n        if layer_num &gt;= 6:\n            #print(\"BLOCK 6 ACTIVE\")\n            if self.block2 is None:\n                self.block2 = d_conv_block(in_channels=32, out_channels=64, kernel_size1=(3,3)).to(x.device)\n            x = self.block2(x)\n        # Block 5\n        if layer_num &gt;= 5:\n            #print(\"BLOCK 5 ACTIVE\")\n            if self.block3 is None:\n                self.block3 = d_conv_block(in_channels=64, out_channels=128, kernel_size1=(3,3)).to(x.device)\n            x = self.block3(x)        \n        # Block 4\n        if layer_num &gt;= 4:\n            #print(\"BLOCK 4 ACTIVE\")\n            if self.block4 is None:\n                self.block4 = d_conv_block(in_channels=128, out_channels=256, kernel_size1=(3,3)).to(x.device)\n            x = self.block4(x)\n        # Block 3\n        if layer_num &gt;= 3:\n            #print(\"BLOCK 3 ACTIVE\")\n            if self.block5 is None:\n                self.block5 = d_conv_block(in_channels=256, out_channels=512, kernel_size1=(3,3)).to(x.device)\n            x = self.block5(x)        \n        # Block 2\n        if layer_num &gt;= 2:\n            #print(\"BLOCK 2 ACTIVE\")\n            if self.block6 is None:\n                self.block6 = d_conv_block(in_channels=512, out_channels=512, kernel_size1=(3,3)).to(x.device)\n            x = self.block6(x)        \n        # Block 1\n        if layer_num &gt;= 1:\n            #print(\"BLOCK 1 ACTIVE\")\n            if self.block7 is None:\n                self.block7 = d_conv_block(in_channels=512, out_channels=512, kernel_size1=(3,3), kernel_size2=(4,4)).to(x.device)\n            x = self.block7(x)\n        \n        # Last FC layer\n        x = x.view(x.size(0), -1) # Reshape the output, i.e. flatten it \n        self.FC1 = d_output_layer(x.size(1)).to(x.device)\n        #print(x.shape)\n        x = self.FC1(x)\n        \n        # The output has to be passed through a sigmoid layer for our BCELoss\n        x = self.sigmoid(x)\n        \n        return x\n\nfinal_d = Discriminator().to(device)\n</code></pre>\n<p>The part of code:</p>\n<pre><code class=\"lang-auto\">expected_channels = [512, 512, 256, 128, 64, 32, 16]\n        if alpha == 0:\n            self.fromRGB = None\n            self.fromRGB = from_to_RGB(in_channels=3, out_channels=expected_channels[layer_num-1]).to(x.device)\n        x = self.fromRGB(x)\n</code></pre>\n<p>Is showing an error when I switch alpha from 0 to 0.05, the error being:</p>\n<pre><code class=\"lang-auto\">RuntimeError: Given groups=1, weight of size [256, 256, 3, 3], expected input[32, 512, 16, 16] to have 256 channels, but got 512 channels instead\n</code></pre>\n<p>It seems to be that when alpha changes to 0.05 the fromRGB layer reverts to the old one even though I set fromRGB to match current expected output dims everytime alpha=0?</p>",772          "post_number": 1,773          "post_type": 1,774          "posts_count": 5,775          "updated_at": "2024-06-18T07:41:48.733Z",776          "reply_count": 1,777          "reply_to_post_number": null,778          "quote_count": 0,779          "incoming_link_count": 8,780          "reads": 6,781          "readers_count": 5,782          "score": 46.2,783          "yours": false,784          "topic_id": 204834,785          "topic_slug": "dynamically-changing-layers-not-working",786          "display_username": "",787          "primary_group_name": null,788          "flair_name": null,789          "flair_url": null,790          "flair_bg_color": null,791          "flair_color": null,792          "flair_group_id": null,793          "badges_granted": [],794          "version": 1,795          "can_edit": false,796          "can_delete": false,797          "can_recover": false,798          "can_see_hidden_post": false,799          "can_wiki": false,800          "read": true,801          "user_title": null,802          "bookmarked": false,803          "actions_summary": [],804          "moderator": false,805          "admin": false,806          "staff": false,807          "user_id": 76733,808          "hidden": false,809          "trust_level": 1,810          "deleted_at": null,811          "user_deleted": false,812          "edit_reason": null,813          "can_view_edit_history": true,814          "wiki": false,815          "post_url": "/t/dynamically-changing-layers-not-working/204834/1",816          "can_accept_answer": false,817          "can_unaccept_answer": false,818          "accepted_answer": false,819          "topic_accepted_answer": null,820          "can_vote": false821        },822        {823          "id": 446299,824          "name": "K. Frank",825          "username": "KFrank",826          "avatar_template": "/letter_avatar_proxy/v4/letter/k/ecb155/{size}.png",827          "created_at": "2024-06-18T22:53:41.738Z",828          "cooked": "<p>Hi YM!</p>\n<aside class=\"quote no-group quote-modified\" data-username=\"YM2132\" data-post=\"1\" data-topic=\"204834\" 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/ym2132/48/70814_2.png\" class=\"avatar\"> YM2132:</div>\n<blockquote>\n<pre><code class=\"lang-auto\">    def forward(self, x, layer_num=1, alpha=0):\n        ...\n        if alpha == 0:\n            self.fromRGB = None\n            self.fromRGB = from_to_RGB(in_channels=3, out_channels=expected_channels[layer_num-1]).to(x.device)\n        x = self.fromRGB(x)\n        ...\n        if layer_num &gt;= 7:\n            #print(\"BLOCK 7 ACTIVE\")\n            if self.block1 is None:\n                self.block1 = d_conv_block(in_channels=16, out_channels=32, kernel_size1=(3,3)).to(x.device)\n            x = self.block1(x)    \n        ....\n        x = x.view(x.size(0), -1) # Reshape the output, i.e. flatten it \n        self.FC1 = d_output_layer(x.size(1)).to(x.device)\n        #print(x.shape)\n        x = self.FC1(x)\n        ...\n</code></pre>\n<p>The part of code:<br>\n…<br>\nIs showing an error when I switch alpha from 0 to 0.05, the error being:</p>\n<pre><code class=\"lang-auto\">RuntimeError: Given groups=1, weight of size [256, 256, 3, 3], expected input[32, 512, 16, 16] to have 256 channels, but got 512 channels instead\n</code></pre>\n<p>It seems to be that when alpha changes to 0.05 the fromRGB layer reverts to the old one even though I set fromRGB</p>\n</blockquote>\n</aside>\n<p>You haven’t show us what <code>from_to_RGB()</code> nor <code>d_conv_block()</code> nor<br>\n<code>d_output_layer()</code> does nor where you call <code>forward()</code> with various<br>\nvalues of <code>layer_num</code> and <code>alpha</code>, so I can’t really say one way or another.<br>\nBut I expect that you may not have located the actual location where your<br>\nerror occurs.</p>\n<p><code>weight of size [256, 256, 3, 3]</code> suggests that you’re passing a tensor<br>\nto a <code>Conv2d (in_channels = 256, out_channels = 256, kernel = 3)</code>,<br>\nbut I don’t see any such <code>Conv2d</code> in your (incomplete) code.</p>\n<p>I would suggest printing out the <code>.shape</code> of <code>x</code> and the <code>.weight.shape</code>s of<br>\nyour <code>self.block</code>s as you progress through <code>forward()</code>, both to see where<br>\nthe error occurs, but, more generally, to see what is going on.</p>\n<p>As an aside, there is nothing logically “wrong” with modifying your layers<br>\nin <code>forward()</code>, but is seems like a bad design to me because, among<br>\nother reasons, it violates what we sometimes call “separation of concerns.”</p>\n<p>Best.</p>\n<p>K. Frank</p>",829          "post_number": 2,830          "post_type": 1,831          "posts_count": 5,832          "updated_at": "2024-06-18T22:53:41.738Z",833          "reply_count": 1,834          "reply_to_post_number": null,835          "quote_count": 1,836          "incoming_link_count": 1,837          "reads": 4,838          "readers_count": 3,839          "score": 10.8,840          "yours": false,841          "topic_id": 204834,842          "topic_slug": "dynamically-changing-layers-not-working",843          "display_username": "K. Frank",844          "primary_group_name": null,845          "flair_name": null,846          "flair_url": null,847          "flair_bg_color": null,848          "flair_color": null,849          "flair_group_id": null,850          "badges_granted": [],851          "version": 1,852          "can_edit": false,853          "can_delete": false,854          "can_recover": false,855          "can_see_hidden_post": false,856          "can_wiki": false,857          "read": true,858          "user_title": null,859          "bookmarked": false,860          "actions_summary": [],861          "moderator": false,862          "admin": false,863          "staff": false,864          "user_id": 18088,865          "hidden": false,866          "trust_level": 2,867          "deleted_at": null,868          "user_deleted": false,869          "edit_reason": null,870          "can_view_edit_history": true,871          "wiki": false,872          "post_url": "/t/dynamically-changing-layers-not-working/204834/2",873          "can_accept_answer": false,874          "can_unaccept_answer": false,875          "accepted_answer": false,876          "topic_accepted_answer": null877        },878        {879          "id": 446325,880          "name": "",881          "username": "YM2132",882          "avatar_template": "/user_avatar/discuss.pytorch.org/ym2132/{size}/70814_2.png",883          "created_at": "2024-06-19T07:15:07.117Z",884          "cooked": "<p>Hey <a class=\"mention\" href=\"/u/kfrank\">@KFrank</a>!</p>\n<p>Thanks for your reply! I’ll include those functions here:</p>\n<pre><code class=\"lang-auto\">def d_conv_block(in_channels, out_channels, kernel_size1=None, kernel_size2=None):\n    if kernel_size2 is not None:\n        block = nn.Sequential(\n            nn.Conv2d(in_channels, in_channels, kernel_size1, padding=(1,1)),\n            nn.BatchNorm2d(in_channels, affine=False),\n            nn.LeakyReLU(0.2),\n            nn.Conv2d(in_channels, out_channels, kernel_size2, padding=(1,1)),\n            nn.BatchNorm2d(out_channels, affine=False),\n            nn.LeakyReLU(0.2),\n            # Downsample\n            nn.AvgPool2d(kernel_size=(2,2)),\n        )\n    else:\n        block = nn.Sequential(\n            nn.Conv2d(in_channels, in_channels, kernel_size1, padding=(1,1)),\n            nn.BatchNorm2d(in_channels, affine=False),\n            nn.LeakyReLU(0.2),\n            nn.Conv2d(in_channels, out_channels, kernel_size1, padding=(1,1)),\n            nn.BatchNorm2d(out_channels, affine=False),\n            nn.LeakyReLU(0.2),\n            # Downsample\n            nn.AvgPool2d(kernel_size=(2,2)),\n        )\n    \n    return block\n\n# Here we remove the nn.Upsample and it will be done externally\ndef g_conv_block(in_channels, out_channels, kernel_size1=None, kernel_size2=None, upsample=False):\n    if upsample:\n        block = nn.Sequential(\n            nn.Conv2d(in_channels, out_channels, kernel_size1, padding=(1,1)),\n            nn.BatchNorm2d(out_channels, affine=False),\n            nn.LeakyReLU(0.2),\n            nn.Conv2d(out_channels, out_channels, kernel_size1, padding=(1,1)),\n            nn.BatchNorm2d(out_channels, affine=False),\n            nn.LeakyReLU(0.2),\n        )\n    else:\n        block = nn.Sequential(\n            nn.Conv2d(in_channels, out_channels, kernel_size1, padding=(3,3)),\n            nn.BatchNorm2d(out_channels, affine=False),\n            nn.LeakyReLU(0.2),\n            nn.Conv2d(out_channels, out_channels, kernel_size2, padding=(1,1)),\n            nn.BatchNorm2d(out_channels, affine=False),\n            nn.LeakyReLU(0.2),\n        )\n    \n    return block\n\n# Create a function to create the output layer?\ndef d_output_layer(input_dim):\n    layer = nn.Linear(input_dim, 1)\n    return layer\n\ndef from_to_RGB(in_channels, out_channels):\n    block = nn.Sequential(\n        nn.Conv2d(in_channels, out_channels, kernel_size=(1,1)),\n        nn.LeakyReLU(0.2),\n    )\n    return block\n</code></pre>\n<p>But yes you were right the issue wasnt with this code. I have got it working now, there was a line of code in my training loop which was wrong. When I made the second call to the discriminator for generated images I had failed to include the parameters alpha and layer_nums.</p>\n<p>Also, regarding changing the modifying of layers in forward() I see why this is an issue, but I was a bit stumped as where else to make the changes. Would you recommend anything (perhaps I should move the logic to a separate method)?</p>\n<p>Thanks</p>\n<p>YM</p>",885          "post_number": 3,886          "post_type": 1,887          "posts_count": 5,888          "updated_at": "2024-06-19T08:20:07.053Z",889          "reply_count": 1,890          "reply_to_post_number": 2,891          "quote_count": 0,892          "incoming_link_count": 0,893          "reads": 3,894          "readers_count": 2,895          "score": 5.6,896          "yours": false,897          "topic_id": 204834,898          "topic_slug": "dynamically-changing-layers-not-working",899          "display_username": "",900          "primary_group_name": null,901          "flair_name": null,902          "flair_url": null,903          "flair_bg_color": null,904          "flair_color": null,905          "flair_group_id": null,906          "badges_granted": [],907          "version": 2,908          "can_edit": false,909          "can_delete": false,910          "can_recover": false,911          "can_see_hidden_post": false,912          "can_wiki": false,913          "read": true,914          "user_title": null,915          "reply_to_user": {916            "id": 18088,917            "username": "KFrank",918            "name": "K. Frank",919            "avatar_template": "/letter_avatar_proxy/v4/letter/k/ecb155/{size}.png"920          },921          "bookmarked": false,922          "actions_summary": [],923          "moderator": false,924          "admin": false,925          "staff": false,926          "user_id": 76733,927          "hidden": false,928          "trust_level": 1,929          "deleted_at": null,930          "user_deleted": false,931          "edit_reason": null,932          "can_view_edit_history": true,933          "wiki": false,934          "post_url": "/t/dynamically-changing-layers-not-working/204834/3",935          "can_accept_answer": false,936          "can_unaccept_answer": false,937          "accepted_answer": false,938          "topic_accepted_answer": null939        },940        {941          "id": 446427,942          "name": "K. Frank",943          "username": "KFrank",944          "avatar_template": "/letter_avatar_proxy/v4/letter/k/ecb155/{size}.png",945          "created_at": "2024-06-19T16:27:39.398Z",946          "cooked": "<p>Hi YM!</p>\n<aside class=\"quote no-group\" data-username=\"YM2132\" data-post=\"3\" data-topic=\"204834\" 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/ym2132/48/70814_2.png\" class=\"avatar\"> YM2132:</div>\n<blockquote>\n<p>Also, regarding changing the modifying of layers in forward() I see why this is an issue, but I was a bit stumped as where else to make the changes. Would you recommend anything (perhaps I should move the logic to a separate method)?</p>\n</blockquote>\n</aside>\n<p>Off the top of my head, I think I would package that logic in a method<br>\nof <code>Discriminator</code>, something like <code>add_layer_to_model()</code> or such.</p>\n<p>The basic idea is that modifying your model (<code>add_layer_to_model()</code>)<br>\nand performing a forward pass (<code>forward()</code>) are two different things, so<br>\nyour code is better organized if you keep them separate in two different<br>\nmethods.</p>\n<p>Best.</p>\n<p>K. Frank</p>",947          "post_number": 4,948          "post_type": 1,949          "posts_count": 5,950          "updated_at": "2024-06-19T16:27:39.398Z",951          "reply_count": 1,952          "reply_to_post_number": 3,953          "quote_count": 1,954          "incoming_link_count": 0,955          "reads": 3,956          "readers_count": 2,957          "score": 5.6,958          "yours": false,959          "topic_id": 204834,960          "topic_slug": "dynamically-changing-layers-not-working",961          "display_username": "K. Frank",962          "primary_group_name": null,963          "flair_name": null,964          "flair_url": null,965          "flair_bg_color": null,966          "flair_color": null,967          "flair_group_id": null,968          "badges_granted": [],969          "version": 1,970          "can_edit": false,971          "can_delete": false,972          "can_recover": false,973          "can_see_hidden_post": false,974          "can_wiki": false,975          "read": true,976          "user_title": null,977          "bookmarked": false,978          "actions_summary": [],979          "moderator": false,980          "admin": false,981          "staff": false,982          "user_id": 18088,983          "hidden": false,984          "trust_level": 2,985          "deleted_at": null,986          "user_deleted": false,987          "edit_reason": null,988          "can_view_edit_history": true,989          "wiki": false,990          "post_url": "/t/dynamically-changing-layers-not-working/204834/4",991          "can_accept_answer": false,992          "can_unaccept_answer": false,993          "accepted_answer": false,994          "topic_accepted_answer": null995        },996        {997          "id": 446486,998          "name": "",999          "username": "YM2132",1000          "avatar_template": "/user_avatar/discuss.pytorch.org/ym2132/{size}/70814_2.png",1001          "created_at": "2024-06-20T07:49:59.222Z",1002          "cooked": "<p>Hi KFrank,</p>\n<p>Okay I think I get you, I appreciate the help and I’ll try and implement it this way <img src=\"https://discuss.pytorch.org/images/emoji/apple/slight_smile.png?v=12\" title=\":slight_smile:\" class=\"emoji\" alt=\":slight_smile:\" loading=\"lazy\" width=\"20\" height=\"20\"></p>\n<p>Thanks,</p>\n<p>YM</p>",1003          "post_number": 5,1004          "post_type": 1,1005          "posts_count": 5,1006          "updated_at": "2024-06-20T07:49:59.222Z",1007          "reply_count": 0,1008          "reply_to_post_number": 4,1009          "quote_count": 0,1010          "incoming_link_count": 1,1011          "reads": 2,1012          "readers_count": 1,1013          "score": 5.4,1014          "yours": false,1015          "topic_id": 204834,1016          "topic_slug": "dynamically-changing-layers-not-working",1017          "display_username": "",1018          "primary_group_name": null,1019          "flair_name": null,1020          "flair_url": null,1021          "flair_bg_color": null,1022          "flair_color": null,1023          "flair_group_id": null,1024          "badges_granted": [],1025          "version": 1,1026          "can_edit": false,1027          "can_delete": false,1028          "can_recover": false,1029          "can_see_hidden_post": false,1030          "can_wiki": false,1031          "read": true,1032          "user_title": null,1033          "reply_to_user": {1034            "id": 18088,1035            "username": "KFrank",1036            "name": "K. Frank",1037            "avatar_template": "/letter_avatar_proxy/v4/letter/k/ecb155/{size}.png"1038          },1039          "bookmarked": false,1040          "actions_summary": [],1041          "moderator": false,1042          "admin": false,1043          "staff": false,1044          "user_id": 76733,1045          "hidden": false,1046          "trust_level": 1,1047          "deleted_at": null,1048          "user_deleted": false,1049          "edit_reason": null,1050          "can_view_edit_history": true,1051          "wiki": false,1052          "post_url": "/t/dynamically-changing-layers-not-working/204834/5",1053          "can_accept_answer": false,1054          "can_unaccept_answer": false,1055          "accepted_answer": false,1056          "topic_accepted_answer": null1057        }1058      ],1059      "stream": [1060        446213,1061        446299,1062        446325,1063        446427,1064        4464861065      ]1066    },1067    "timeline_lookup": [1068      [1069        1,1070        4941071      ],1072      [1073        3,1074        4931075      ],1076      [1077        5,1078        4921079      ]1080    ],1081    "suggested_topics": [1082      {1083        "fancy_title": "Using diffetent conv2d ops with pre trained models",1084        "id": 214367,1085        "title": "Using diffetent conv2d ops with pre trained models",1086        "slug": "using-diffetent-conv2d-ops-with-pre-trained-models",1087        "posts_count": 7,1088        "reply_count": 5,1089        "highest_post_number": 7,1090        "image_url": null,1091        "created_at": "2024-12-18T17:19:18.711Z",1092        "last_posted_at": "2024-12-20T23:49:50.377Z",1093        "bumped": true,1094        "bumped_at": "2024-12-20T23:49:50.377Z",1095        "archetype": "regular",1096        "unseen": false,1097        "pinned": false,1098        "unpinned": null,1099        "visible": true,1100        "closed": false,1101        "archived": false,1102        "bookmarked": null,1103        "liked": null,1104        "tags_descriptions": {},1105        "like_count": 0,1106        "views": 117,1107        "category_id": 1,1108        "featured_link": null,1109        "has_accepted_answer": false,1110        "posters": [1111          {1112            "extras": null,1113            "description": "Original Poster",1114            "user": {1115              "id": 74208,1116              "username": "Izan_C_G",1117              "name": "Izan C. G",1118              "avatar_template": "/user_avatar/discuss.pytorch.org/izan_c_g/{size}/68535_2.png",1119              "trust_level": 11120            }1121          },1122          {1123            "extras": "latest",1124            "description": "Most Recent Poster",1125            "user": {1126              "id": 41396,1127              "username": "soulitzer",1128              "name": "",1129              "avatar_template": "/letter_avatar_proxy/v4/letter/s/839c29/{size}.png",1130              "trust_level": 21131            }1132          }1133        ]1134      },1135      {1136        "fancy_title": "Dynamic shapes and PyTorch",1137        "id": 214929,1138        "title": "Dynamic shapes and PyTorch",1139        "slug": "dynamic-shapes-and-pytorch",1140        "posts_count": 3,1141        "reply_count": 0,1142        "highest_post_number": 3,1143        "image_url": null,1144        "created_at": "2025-01-03T10:34:36.679Z",1145        "last_posted_at": "2025-01-03T21:48:49.713Z",1146        "bumped": true,1147        "bumped_at": "2025-01-03T21:48:49.713Z",1148        "archetype": "regular",1149        "unseen": false,1150        "pinned": false,1151        "unpinned": null,1152        "visible": true,1153        "closed": false,1154        "archived": false,1155        "bookmarked": null,1156        "liked": null,1157        "tags_descriptions": {},1158        "like_count": 1,1159        "views": 252,1160        "category_id": 1,1161        "featured_link": null,1162        "has_accepted_answer": false,1163        "posters": [1164          {1165            "extras": null,1166            "description": "Original Poster",1167            "user": {1168              "id": 81854,1169              "username": "Mark_Fanter",1170              "name": "Mark Fanter",1171              "avatar_template": "/user_avatar/discuss.pytorch.org/mark_fanter/{size}/74876_2.png",1172              "trust_level": 01173            }1174          },1175          {1176            "extras": null,1177            "description": "Frequent Poster",1178            "user": {1179              "id": 41396,1180              "username": "soulitzer",1181              "name": "",1182              "avatar_template": "/letter_avatar_proxy/v4/letter/s/839c29/{size}.png",1183              "trust_level": 21184            }1185          },1186          {1187            "extras": "latest",1188            "description": "Most Recent Poster",1189            "user": {1190              "id": 18088,1191              "username": "KFrank",1192              "name": "K. Frank",1193              "avatar_template": "/letter_avatar_proxy/v4/letter/k/ecb155/{size}.png",1194              "trust_level": 21195            }1196          }1197        ]1198      },1199      {1200        "fancy_title": "Pytorch not compatible with sm_86 CUDA Capability",

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