CoolFace
Datasetpublic

Anurag1734/cuda-error-resolution-analysis

sourceHugging Faceupdated 2mo agoView on Hugging Face
0likes7downloads
topics_batch_267.json69297 linesDownload Raw Back to raw
1[2  {3    "post_stream": {4      "posts": [5        {6          "id": 312298,7          "name": "",8          "username": "blade",9          "avatar_template": "/user_avatar/discuss.pytorch.org/blade/{size}/23861_2.png",10          "created_at": "2021-10-18T15:55:41.437Z",11          "cooked": "<p>I’m trying to access model parameters using the internal <code>._parameters</code> method. When I define the model as below, I get model parameters without any issue</p>\n<pre><code class=\"lang-auto\">model = nn.Linear(10, 10)\nprint(model._parameters)\n</code></pre>\n<p>However, when I use this method to get parameters of a model defined as a class, I get an empty <code>OrderedDict()</code>.</p>\n<pre><code class=\"lang-auto\">class MyModel(nn.Module):\n    def __init__(self):\n        super(MyModel, self).__init__()\n        self.fc = nn.Linear(10, 10)\n\n    def forward(self, x):\n        return self.fc(x)\n\nmodel = MyModel()\nprint(model._parameters)\n</code></pre>\n<p>Is there a solution to this using <code>._parameters</code>?</p>\n<p>NOTE: I understand that using internal methods are frowned upon.</p>",12          "post_number": 1,13          "post_type": 1,14          "posts_count": 15,15          "updated_at": "2021-10-18T16:12:58.079Z",16          "reply_count": 0,17          "reply_to_post_number": null,18          "quote_count": 0,19          "incoming_link_count": 908,20          "reads": 32,21          "readers_count": 31,22          "score": 4541.4,23          "yours": false,24          "topic_id": 134549,25          "topic_slug": "issue-using-parameters-internal-method",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": 2,35          "can_edit": false,36          "can_delete": false,37          "can_recover": false,38          "can_see_hidden_post": false,39          "can_wiki": false,40          "link_counts": [41            {42              "url": "https://discuss.pytorch.org/t/higher-order-gradient-of-optimization-procedure-of-whole-nn-module/24163/13",43              "internal": true,44              "reflection": true,45              "title": "Higher order: gradient of optimization procedure of whole nn.Module",46              "clicks": 047            }48          ],49          "read": true,50          "user_title": null,51          "bookmarked": false,52          "actions_summary": [],53          "moderator": false,54          "admin": false,55          "staff": false,56          "user_id": 25189,57          "hidden": false,58          "trust_level": 2,59          "deleted_at": null,60          "user_deleted": false,61          "edit_reason": null,62          "can_view_edit_history": true,63          "wiki": false,64          "post_url": "/t/issue-using-parameters-internal-method/134549/1",65          "can_accept_answer": false,66          "can_unaccept_answer": false,67          "accepted_answer": false,68          "topic_accepted_answer": true,69          "can_vote": false70        },71        {72          "id": 312309,73          "name": "Alban D",74          "username": "albanD",75          "avatar_template": "/user_avatar/discuss.pytorch.org/alband/{size}/215_2.png",76          "created_at": "2021-10-18T16:36:34.288Z",77          "cooked": "<p>Hi,</p>\n<p>Could you give more details on why you use this instead of <code>model.parameters()</code> ?</p>",78          "post_number": 2,79          "post_type": 1,80          "posts_count": 15,81          "updated_at": "2021-10-18T16:36:34.288Z",82          "reply_count": 1,83          "reply_to_post_number": null,84          "quote_count": 0,85          "incoming_link_count": 4,86          "reads": 28,87          "readers_count": 27,88          "score": 30.6,89          "yours": false,90          "topic_id": 134549,91          "topic_slug": "issue-using-parameters-internal-method",92          "display_username": "Alban D",93          "primary_group_name": null,94          "flair_name": null,95          "flair_url": null,96          "flair_bg_color": null,97          "flair_color": null,98          "flair_group_id": null,99          "badges_granted": [],100          "version": 1,101          "can_edit": false,102          "can_delete": false,103          "can_recover": false,104          "can_see_hidden_post": false,105          "can_wiki": false,106          "read": true,107          "user_title": "",108          "bookmarked": false,109          "actions_summary": [],110          "moderator": true,111          "admin": true,112          "staff": true,113          "user_id": 211,114          "hidden": false,115          "trust_level": 4,116          "deleted_at": null,117          "user_deleted": false,118          "edit_reason": null,119          "can_view_edit_history": true,120          "wiki": false,121          "post_url": "/t/issue-using-parameters-internal-method/134549/2",122          "can_accept_answer": false,123          "can_unaccept_answer": false,124          "accepted_answer": false,125          "topic_accepted_answer": true126        },127        {128          "id": 312311,129          "name": "",130          "username": "blade",131          "avatar_template": "/user_avatar/discuss.pytorch.org/blade/{size}/23861_2.png",132          "created_at": "2021-10-18T16:47:12.581Z",133          "cooked": "<p>A number of models that differentiate through an optimization algorithm use this in order to maintain the differentiability of the model. <a href=\"https://github.com/learnables/learn2learn/blob/ad0ffc1b85d4d08706eb592f78eca3f2c61f3360/learn2learn/utils/__init__.py#L227\" rel=\"noopener nofollow ugc\">Here</a> is a meta-learning package that uses this approach (see L. 273) and <a href=\"https://discuss.pytorch.org/t/higher-order-gradient-of-optimization-procedure-of-whole-nn-module/24163/9\">here</a> is another user that uses this to solve a similar problem.</p>",134          "post_number": 3,135          "post_type": 1,136          "posts_count": 15,137          "updated_at": "2021-10-18T16:49:40.092Z",138          "reply_count": 1,139          "reply_to_post_number": 2,140          "quote_count": 0,141          "incoming_link_count": 5,142          "reads": 27,143          "readers_count": 26,144          "score": 35.4,145          "yours": false,146          "topic_id": 134549,147          "topic_slug": "issue-using-parameters-internal-method",148          "display_username": "",149          "primary_group_name": null,150          "flair_name": null,151          "flair_url": null,152          "flair_bg_color": null,153          "flair_color": null,154          "flair_group_id": null,155          "badges_granted": [],156          "version": 1,157          "can_edit": false,158          "can_delete": false,159          "can_recover": false,160          "can_see_hidden_post": false,161          "can_wiki": false,162          "link_counts": [163            {164              "url": "https://github.com/learnables/learn2learn/blob/ad0ffc1b85d4d08706eb592f78eca3f2c61f3360/learn2learn/utils/__init__.py#L227",165              "internal": false,166              "reflection": false,167              "title": "learn2learn/__init__.py at ad0ffc1b85d4d08706eb592f78eca3f2c61f3360 · learnables/learn2learn · GitHub",168              "clicks": 4169            },170            {171              "url": "https://discuss.pytorch.org/t/higher-order-gradient-of-optimization-procedure-of-whole-nn-module/24163/9",172              "internal": true,173              "reflection": false,174              "title": "Higher order: gradient of optimization procedure of whole nn.Module",175              "clicks": 4176            }177          ],178          "read": true,179          "user_title": null,180          "reply_to_user": {181            "id": 211,182            "username": "albanD",183            "name": "Alban D",184            "avatar_template": "/user_avatar/discuss.pytorch.org/alband/{size}/215_2.png"185          },186          "bookmarked": false,187          "actions_summary": [],188          "moderator": false,189          "admin": false,190          "staff": false,191          "user_id": 25189,192          "hidden": false,193          "trust_level": 2,194          "deleted_at": null,195          "user_deleted": false,196          "edit_reason": null,197          "can_view_edit_history": true,198          "wiki": false,199          "post_url": "/t/issue-using-parameters-internal-method/134549/3",200          "can_accept_answer": false,201          "can_unaccept_answer": false,202          "accepted_answer": false,203          "topic_accepted_answer": true204        },205        {206          "id": 312322,207          "name": "Alban D",208          "username": "albanD",209          "avatar_template": "/user_avatar/discuss.pytorch.org/alband/{size}/215_2.png",210          "created_at": "2021-10-18T17:30:38.471Z",211          "cooked": "<p>I think a nicer solution here is to just del/set the attribute so that you don’t get into trouble:</p>\n<pre><code class=\"lang-python\">module._parameters[param_key] = memo[p]\n\n# Can become\ndelattr(module, param_key)\nsetattr(module, param_key, memo[p])\n</code></pre>\n<p>Taking a step back, we have a new experiemental “stateless” version of Module that might help you here (<a href=\"https://github.com/pytorch/pytorch/blob/8532061bce8da8b5fe9ecce1067ade16793a7ee3/torch/nn/utils/_stateless.py#L36\" class=\"inline-onebox\">pytorch/_stateless.py at 8532061bce8da8b5fe9ecce1067ade16793a7ee3 · pytorch/pytorch · GitHub</a>)<br>\nIn particular, you can call your Module with a set of params without having to set them as parameters with <code>functional_call(model, temporary_params, input)</code>.</p>",212          "post_number": 4,213          "post_type": 1,214          "posts_count": 15,215          "updated_at": "2021-10-18T17:30:38.471Z",216          "reply_count": 1,217          "reply_to_post_number": 3,218          "quote_count": 0,219          "incoming_link_count": 12,220          "reads": 27,221          "readers_count": 26,222          "score": 70.4,223          "yours": false,224          "topic_id": 134549,225          "topic_slug": "issue-using-parameters-internal-method",226          "display_username": "Alban D",227          "primary_group_name": null,228          "flair_name": null,229          "flair_url": null,230          "flair_bg_color": null,231          "flair_color": null,232          "flair_group_id": null,233          "badges_granted": [],234          "version": 1,235          "can_edit": false,236          "can_delete": false,237          "can_recover": false,238          "can_see_hidden_post": false,239          "can_wiki": false,240          "link_counts": [241            {242              "url": "https://github.com/pytorch/pytorch/blob/8532061bce8da8b5fe9ecce1067ade16793a7ee3/torch/nn/utils/_stateless.py#L36",243              "internal": false,244              "reflection": false,245              "title": "pytorch/_stateless.py at 8532061bce8da8b5fe9ecce1067ade16793a7ee3 · pytorch/pytorch · GitHub",246              "clicks": 8247            }248          ],249          "read": true,250          "user_title": "",251          "reply_to_user": {252            "id": 25189,253            "username": "blade",254            "name": "",255            "avatar_template": "/user_avatar/discuss.pytorch.org/blade/{size}/23861_2.png"256          },257          "bookmarked": false,258          "actions_summary": [],259          "moderator": true,260          "admin": true,261          "staff": true,262          "user_id": 211,263          "hidden": false,264          "trust_level": 4,265          "deleted_at": null,266          "user_deleted": false,267          "edit_reason": null,268          "can_view_edit_history": true,269          "wiki": false,270          "post_url": "/t/issue-using-parameters-internal-method/134549/4",271          "can_accept_answer": false,272          "can_unaccept_answer": false,273          "accepted_answer": false,274          "topic_accepted_answer": true275        },276        {277          "id": 312499,278          "name": "",279          "username": "blade",280          "avatar_template": "/user_avatar/discuss.pytorch.org/blade/{size}/23861_2.png",281          "created_at": "2021-10-19T15:15:44.308Z",282          "cooked": "<p>So, re the first part, when I run:</p>\n<pre><code class=\"lang-auto\">delattr(model._modules[key], param_key)\nsetattr(model._modules[key], param_key, updated)\n\nprint(model._modules[key]._parameters[param_key])\n</code></pre>\n<p>I get the error:</p>\n<blockquote>\n<pre><code>print(model._modules[key]._parameters[param_key])\n</code></pre>\n<p>KeyError: ‘weight’</p>\n</blockquote>\n<p>where <code>param_key</code> is <code>weight</code>. The point being, when I loop over parameters using</p>\n<pre><code class=\"lang-auto\">for param_key in model._modules[key]._parameters:\n    # module._modules[key]._parameters[param_key] = memo[p]  # old\n\n    delattr(module, param_key)\n    setattr(module, param_key, memo[p])\n</code></pre>\n<p>upon the second iteration I get the error:</p>\n<blockquote>\n<pre><code>for param_key in model._modules[key]._parameters:\n</code></pre>\n<p>RuntimeError: OrderedDict mutated during iteration</p>\n</blockquote>\n<p>Re the second part, I tried using <code>_stateless</code> with the snippet you provided <a href=\"https://discuss.pytorch.org/t/disable-in-place-updates-in-troch-nn/134504/4\">here</a>, and I’m getting the following error:</p>\n<blockquote>\n<pre><code>for name, tensor in parameters_and_buffers.items():\n</code></pre>\n<p>AttributeError: ‘generator’ object has no attribute ‘items’</p>\n</blockquote>\n<p>when I</p>\n<pre><code class=\"lang-auto\">print(params)\n</code></pre>\n<p>I get</p>\n<blockquote>\n<p>&lt;generator object Module.named_parameters at 0x7f98f8dc1450&gt;</p>\n</blockquote>\n<p>My model parameters include:</p>\n<pre><code class=\"lang-auto\">self.fc = nn.Linear(10, 10)\nself.relu = nn.ReLU()\nself.params_list = nn.ParameterList([self.fc1.weight, self.fc1.bias])\n</code></pre>",283          "post_number": 5,284          "post_type": 1,285          "posts_count": 15,286          "updated_at": "2021-10-19T15:23:32.360Z",287          "reply_count": 1,288          "reply_to_post_number": 4,289          "quote_count": 0,290          "incoming_link_count": 10,291          "reads": 24,292          "readers_count": 23,293          "score": 59.8,294          "yours": false,295          "topic_id": 134549,296          "topic_slug": "issue-using-parameters-internal-method",297          "display_username": "",298          "primary_group_name": null,299          "flair_name": null,300          "flair_url": null,301          "flair_bg_color": null,302          "flair_color": null,303          "flair_group_id": null,304          "badges_granted": [],305          "version": 2,306          "can_edit": false,307          "can_delete": false,308          "can_recover": false,309          "can_see_hidden_post": false,310          "can_wiki": false,311          "link_counts": [312            {313              "url": "https://discuss.pytorch.org/t/disable-in-place-updates-in-troch-nn/134504/4",314              "internal": true,315              "reflection": false,316              "title": "Disable \"in-place\" updates in troch.nn",317              "clicks": 0318            }319          ],320          "read": true,321          "user_title": null,322          "reply_to_user": {323            "id": 211,324            "username": "albanD",325            "name": "Alban D",326            "avatar_template": "/user_avatar/discuss.pytorch.org/alband/{size}/215_2.png"327          },328          "bookmarked": false,329          "actions_summary": [],330          "moderator": false,331          "admin": false,332          "staff": false,333          "user_id": 25189,334          "hidden": false,335          "trust_level": 2,336          "deleted_at": null,337          "user_deleted": false,338          "edit_reason": null,339          "can_view_edit_history": true,340          "wiki": false,341          "post_url": "/t/issue-using-parameters-internal-method/134549/5",342          "can_accept_answer": false,343          "can_unaccept_answer": false,344          "accepted_answer": false,345          "topic_accepted_answer": true346        },347        {348          "id": 312505,349          "name": "Alban D",350          "username": "albanD",351          "avatar_template": "/user_avatar/discuss.pytorch.org/alband/{size}/215_2.png",352          "created_at": "2021-10-19T15:37:57.721Z",353          "cooked": "<aside class=\"quote no-group\" data-username=\"blade\" data-post=\"5\" data-topic=\"134549\">\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/blade/48/23861_2.png\" class=\"avatar\"> blade:</div>\n<blockquote>\n<p>KeyError: ‘weight’</p>\n</blockquote>\n</aside>\n<p>This is expected. If you want plain Tensors instead of Parameters, then they won’t be registered as parameters anymore (and so won’t be in _parameters).<br>\nBut accessing the field on your Module will work as you expect and you will be able to differentiate through it.</p>\n<blockquote>\n<p>AttributeError: ‘generator’ object has no attribute ‘items’</p>\n</blockquote>\n<p>Ho that’s an oversight on our end.<br>\nCould you open an issue on github asking to add support for generator object on that API please?<br>\nAs a workaround, you can use <code>dict(model.named_parameters())</code> to make an actual dict from the generator.</p>",354          "post_number": 6,355          "post_type": 1,356          "posts_count": 15,357          "updated_at": "2021-10-19T15:37:57.721Z",358          "reply_count": 2,359          "reply_to_post_number": 5,360          "quote_count": 1,361          "incoming_link_count": 52,362          "reads": 21,363          "readers_count": 20,364          "score": 274.2,365          "yours": false,366          "topic_id": 134549,367          "topic_slug": "issue-using-parameters-internal-method",368          "display_username": "Alban D",369          "primary_group_name": null,370          "flair_name": null,371          "flair_url": null,372          "flair_bg_color": null,373          "flair_color": null,374          "flair_group_id": null,375          "badges_granted": [],376          "version": 1,377          "can_edit": false,378          "can_delete": false,379          "can_recover": false,380          "can_see_hidden_post": false,381          "can_wiki": false,382          "read": true,383          "user_title": "",384          "bookmarked": false,385          "actions_summary": [],386          "moderator": true,387          "admin": true,388          "staff": true,389          "user_id": 211,390          "hidden": false,391          "trust_level": 4,392          "deleted_at": null,393          "user_deleted": false,394          "edit_reason": null,395          "can_view_edit_history": true,396          "wiki": false,397          "post_url": "/t/issue-using-parameters-internal-method/134549/6",398          "can_accept_answer": false,399          "can_unaccept_answer": false,400          "accepted_answer": false,401          "topic_accepted_answer": true402        },403        {404          "id": 312507,405          "name": "",406          "username": "blade",407          "avatar_template": "/user_avatar/discuss.pytorch.org/blade/{size}/23861_2.png",408          "created_at": "2021-10-19T15:40:29.731Z",409          "cooked": "<aside class=\"quote no-group\" data-username=\"albanD\" data-post=\"6\" data-topic=\"134549\">\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/alband/48/215_2.png\" class=\"avatar\"> albanD:</div>\n<blockquote>\n<p>Could you open an issue on github asking to add support for generator object on that API please?</p>\n</blockquote>\n</aside>\n<p>Sure! will do. thanks!</p>",410          "post_number": 7,411          "post_type": 1,412          "posts_count": 15,413          "updated_at": "2021-10-19T15:40:29.731Z",414          "reply_count": 0,415          "reply_to_post_number": 6,416          "quote_count": 1,417          "incoming_link_count": 1,418          "reads": 19,419          "readers_count": 18,420          "score": 8.8,421          "yours": false,422          "topic_id": 134549,423          "topic_slug": "issue-using-parameters-internal-method",424          "display_username": "",425          "primary_group_name": null,426          "flair_name": null,427          "flair_url": null,428          "flair_bg_color": null,429          "flair_color": null,430          "flair_group_id": null,431          "badges_granted": [],432          "version": 1,433          "can_edit": false,434          "can_delete": false,435          "can_recover": false,436          "can_see_hidden_post": false,437          "can_wiki": false,438          "read": true,439          "user_title": null,440          "bookmarked": false,441          "actions_summary": [],442          "moderator": false,443          "admin": false,444          "staff": false,445          "user_id": 25189,446          "hidden": false,447          "trust_level": 2,448          "deleted_at": null,449          "user_deleted": false,450          "edit_reason": null,451          "can_view_edit_history": true,452          "wiki": false,453          "post_url": "/t/issue-using-parameters-internal-method/134549/7",454          "can_accept_answer": false,455          "can_unaccept_answer": false,456          "accepted_answer": false,457          "topic_accepted_answer": true458        },459        {460          "id": 312528,461          "name": "",462          "username": "blade",463          "avatar_template": "/user_avatar/discuss.pytorch.org/blade/{size}/23861_2.png",464          "created_at": "2021-10-19T17:35:43.151Z",465          "cooked": "<aside class=\"quote no-group\" data-username=\"albanD\" data-post=\"6\" data-topic=\"134549\">\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/alband/48/215_2.png\" class=\"avatar\"> albanD:</div>\n<blockquote>\n<p>Could you open an issue on github asking to add support for generator object on that API please?</p>\n</blockquote>\n</aside>\n<p>The <a href=\"https://github.com/pytorch/pytorch/issues/66874\" rel=\"noopener nofollow ugc\">request</a> was shoot down.</p>",466          "post_number": 8,467          "post_type": 1,468          "posts_count": 15,469          "updated_at": "2021-10-19T17:35:43.151Z",470          "reply_count": 1,471          "reply_to_post_number": 6,472          "quote_count": 1,473          "incoming_link_count": 1,474          "reads": 18,475          "readers_count": 17,476          "score": 13.6,477          "yours": false,478          "topic_id": 134549,479          "topic_slug": "issue-using-parameters-internal-method",480          "display_username": "",481          "primary_group_name": null,482          "flair_name": null,483          "flair_url": null,484          "flair_bg_color": null,485          "flair_color": null,486          "flair_group_id": null,487          "badges_granted": [],488          "version": 1,489          "can_edit": false,490          "can_delete": false,491          "can_recover": false,492          "can_see_hidden_post": false,493          "can_wiki": false,494          "link_counts": [495            {496              "url": "https://github.com/pytorch/pytorch/issues/66874",497              "internal": false,498              "reflection": false,499              "title": "Error using _stateless version of Module · Issue #66874 · pytorch/pytorch · GitHub",500              "clicks": 9501            }502          ],503          "read": true,504          "user_title": null,505          "bookmarked": false,506          "actions_summary": [],507          "moderator": false,508          "admin": false,509          "staff": false,510          "user_id": 25189,511          "hidden": false,512          "trust_level": 2,513          "deleted_at": null,514          "user_deleted": false,515          "edit_reason": null,516          "can_view_edit_history": true,517          "wiki": false,518          "post_url": "/t/issue-using-parameters-internal-method/134549/8",519          "can_accept_answer": false,520          "can_unaccept_answer": false,521          "accepted_answer": false,522          "topic_accepted_answer": true523        },524        {525          "id": 312530,526          "name": "Alban D",527          "username": "albanD",528          "avatar_template": "/user_avatar/discuss.pytorch.org/alband/{size}/215_2.png",529          "created_at": "2021-10-19T17:48:45.322Z",530          "cooked": "<p>Let’s pursue that conversation on the issue.<br>\nHopefully you should be unblocked for now without it by adding a dict() call right?</p>",531          "post_number": 9,532          "post_type": 1,533          "posts_count": 15,534          "updated_at": "2021-10-19T17:48:45.322Z",535          "reply_count": 2,536          "reply_to_post_number": 8,537          "quote_count": 0,538          "incoming_link_count": 1,539          "reads": 19,540          "readers_count": 18,541          "score": 18.8,542          "yours": false,543          "topic_id": 134549,544          "topic_slug": "issue-using-parameters-internal-method",545          "display_username": "Alban D",546          "primary_group_name": null,547          "flair_name": null,548          "flair_url": null,549          "flair_bg_color": null,550          "flair_color": null,551          "flair_group_id": null,552          "badges_granted": [],553          "version": 1,554          "can_edit": false,555          "can_delete": false,556          "can_recover": false,557          "can_see_hidden_post": false,558          "can_wiki": false,559          "read": true,560          "user_title": "",561          "reply_to_user": {562            "id": 25189,563            "username": "blade",564            "name": "",565            "avatar_template": "/user_avatar/discuss.pytorch.org/blade/{size}/23861_2.png"566          },567          "bookmarked": false,568          "actions_summary": [],569          "moderator": true,570          "admin": true,571          "staff": true,572          "user_id": 211,573          "hidden": false,574          "trust_level": 4,575          "deleted_at": null,576          "user_deleted": false,577          "edit_reason": null,578          "can_view_edit_history": true,579          "wiki": false,580          "post_url": "/t/issue-using-parameters-internal-method/134549/9",581          "can_accept_answer": false,582          "can_unaccept_answer": false,583          "accepted_answer": false,584          "topic_accepted_answer": true585        },586        {587          "id": 312550,588          "name": "",589          "username": "blade",590          "avatar_template": "/user_avatar/discuss.pytorch.org/blade/{size}/23861_2.png",591          "created_at": "2021-10-19T21:36:08.881Z",592          "cooked": "<aside class=\"quote no-group\" data-username=\"albanD\" data-post=\"9\" data-topic=\"134549\">\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/alband/48/215_2.png\" class=\"avatar\"> albanD:</div>\n<blockquote>\n<p>Hopefully you should be unblocked for now without it by adding a dict() call right?</p>\n</blockquote>\n</aside>\n<p>That is correct. Thanks!</p>",593          "post_number": 10,594          "post_type": 1,595          "posts_count": 15,596          "updated_at": "2021-10-19T21:36:08.881Z",597          "reply_count": 0,598          "reply_to_post_number": 9,599          "quote_count": 1,600          "incoming_link_count": 9,601          "reads": 19,602          "readers_count": 18,603          "score": 48.8,604          "yours": false,605          "topic_id": 134549,606          "topic_slug": "issue-using-parameters-internal-method",607          "display_username": "",608          "primary_group_name": null,609          "flair_name": null,610          "flair_url": null,611          "flair_bg_color": null,612          "flair_color": null,613          "flair_group_id": null,614          "badges_granted": [],615          "version": 1,616          "can_edit": false,617          "can_delete": false,618          "can_recover": false,619          "can_see_hidden_post": false,620          "can_wiki": false,621          "read": true,622          "user_title": null,623          "bookmarked": false,624          "actions_summary": [],625          "moderator": false,626          "admin": false,627          "staff": false,628          "user_id": 25189,629          "hidden": false,630          "trust_level": 2,631          "deleted_at": null,632          "user_deleted": false,633          "edit_reason": null,634          "can_view_edit_history": true,635          "wiki": false,636          "post_url": "/t/issue-using-parameters-internal-method/134549/10",637          "can_accept_answer": false,638          "can_unaccept_answer": false,639          "accepted_answer": false,640          "topic_accepted_answer": true641        },642        {643          "id": 312687,644          "name": "",645          "username": "blade",646          "avatar_template": "/user_avatar/discuss.pytorch.org/blade/{size}/23861_2.png",647          "created_at": "2021-10-20T15:43:07.859Z",648          "cooked": "<p>I wrote a short snippet to test ‘_stateless’. In my example I tried to update weights of a network in an inner optimization loop and to learn the learning rate of the weight updates in an outer optimization loop (meta-optimization). I’m getting the error:</p>\n<blockquote>\n<p>RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation: [torch.FloatTensor [3, 10]], which is output 0 of AsStridedBackward0, is at version 12; expected version 2 instead. Hint: enable anomaly detection to find the operation that failed to compute its gradient, with torch.autograd.set_detect_anomaly(True).</p>\n</blockquote>\n<p>My code snippet is:</p>\n<pre><code class=\"lang-auto\">import torch\nfrom torch import nn, optim\nfrom torch.utils.data import Dataset, DataLoader\n\nfrom torch.nn.utils import _stateless\n\n\nclass MyDataset(Dataset):\n    def __init__(self, N):\n        self.N = N\n        self.x = torch.rand(self.N, 10)\n        self.y = torch.randint(0, 3, (self.N,))\n\n    def __len__(self):\n        return self.N\n\n    def __getitem__(self, idx):\n        return self.x[idx], self.y[idx]\n\n\nclass MyModel(nn.Module):\n    def __init__(self):\n        super(MyModel, self).__init__()\n        self.fc1 = nn.Linear(10, 10)\n        self.fc2 = nn.Linear(10, 3)\n\n        self.relu = nn.ReLU()\n\n        self.alpha = nn.Parameter(torch.randn(1))\n        self.beta = nn.Parameter(torch.randn(1))\n\n    def forward(self, x):\n        y = self.relu(self.fc1(x))\n        return self.fc2(y)\n\nepochs = 20\nN = 100\ndataset = DataLoader(dataset=MyDataset(N), batch_size=10)\nmodel = MyModel()\nloss_func = nn.CrossEntropyLoss()\n\noptim = optim.Adam([model.alpha], lr=1e-3)\n\nparams = dict(model.named_parameters())\nfor i in range(epochs):\n    model.train()\n    train_loss = 0\n    for batch_idx, (x, y) in enumerate(dataset):\n        logits = _stateless.functional_call(model, params, x)             # predict\n        loss_inner = loss_func(logits, y)                                 # loss\n        optim.zero_grad()                                                 # reset grad\n        loss_inner.backward(create_graph=True, inputs=params.values())    # compute grad\n        train_loss += loss_inner.item()                                   # store loss\n        for k, p in params.items():\n            if k is not 'alpha' and k is not 'beta':\n                p.update = - model.alpha * p.grad\n                params[k] = p + p.update                      # update weight\n\n    print('Train Epoch: {}\\tLoss: {:.6f}'.format(i, train_loss / N))\n    logits = _stateless.functional_call(model, params, x)                 # predict\n    loss_meta = loss_func(logits, y)\n    loss_meta.backward()\n    loss_meta.step()\n</code></pre>\n<p>From the error message, I understand that the issue comes from weight update for the weights of the second layer of the network, which points to an error in my inner loop optimization. Do you have suggestions? Thanks!</p>\n<p>PS: I thought this is not directly relevant to the feature request, but I can move my question to the github issue if you prefer to discuss there. Thank you!</p>",649          "post_number": 11,650          "post_type": 1,651          "posts_count": 15,652          "updated_at": "2021-10-20T15:53:06.457Z",653          "reply_count": 1,654          "reply_to_post_number": 9,655          "quote_count": 0,656          "incoming_link_count": 80,657          "reads": 19,658          "readers_count": 18,659          "score": 408.8,660          "yours": false,661          "topic_id": 134549,662          "topic_slug": "issue-using-parameters-internal-method",663          "display_username": "",664          "primary_group_name": null,665          "flair_name": null,666          "flair_url": null,667          "flair_bg_color": null,668          "flair_color": null,669          "flair_group_id": null,670          "badges_granted": [],671          "version": 2,672          "can_edit": false,673          "can_delete": false,674          "can_recover": false,675          "can_see_hidden_post": false,676          "can_wiki": false,677          "read": true,678          "user_title": null,679          "reply_to_user": {680            "id": 211,681            "username": "albanD",682            "name": "Alban D",683            "avatar_template": "/user_avatar/discuss.pytorch.org/alband/{size}/215_2.png"684          },685          "bookmarked": false,686          "actions_summary": [],687          "moderator": false,688          "admin": false,689          "staff": false,690          "user_id": 25189,691          "hidden": false,692          "trust_level": 2,693          "deleted_at": null,694          "user_deleted": false,695          "edit_reason": null,696          "can_view_edit_history": true,697          "wiki": false,698          "post_url": "/t/issue-using-parameters-internal-method/134549/11",699          "can_accept_answer": false,700          "can_unaccept_answer": false,701          "accepted_answer": false,702          "topic_accepted_answer": true703        },704        {705          "id": 312872,706          "name": "Alban D",707          "username": "albanD",708          "avatar_template": "/user_avatar/discuss.pytorch.org/alband/{size}/215_2.png",709          "created_at": "2021-10-21T16:03:38.506Z",710          "cooked": "<p>This is indeed unrelated.</p>\n<p>If you enable anomaly mode, you will see that the problem is that some of the params are saved for backward but modified inplace. The fix is to make sure they are not:</p>\n<pre><code class=\"lang-python\">for i in range(epochs):\n    model.train()\n    train_loss = 0\n    params = dict(model.named_parameters()) # !! Extract these for each inner loop\n    for batch_idx, (x, y) in enumerate(dataset):\n        params = {k: v.clone() for k,v in params.items()} # !! Make sure the modified params are not the ones you use\n        logits = _stateless.functional_call(model, params, x)             # predict\n        # ... rest of your code\n</code></pre>",711          "post_number": 12,712          "post_type": 1,713          "posts_count": 15,714          "updated_at": "2021-10-21T16:03:38.506Z",715          "reply_count": 1,716          "reply_to_post_number": 11,717          "quote_count": 0,718          "incoming_link_count": 7,719          "reads": 17,720          "readers_count": 16,721          "score": 58.4,722          "yours": false,723          "topic_id": 134549,724          "topic_slug": "issue-using-parameters-internal-method",725          "display_username": "Alban D",726          "primary_group_name": null,727          "flair_name": null,728          "flair_url": null,729          "flair_bg_color": null,730          "flair_color": null,731          "flair_group_id": null,732          "badges_granted": [],733          "version": 1,734          "can_edit": false,735          "can_delete": false,736          "can_recover": false,737          "can_see_hidden_post": false,738          "can_wiki": false,739          "read": true,740          "user_title": "",741          "reply_to_user": {742            "id": 25189,743            "username": "blade",744            "name": "",745            "avatar_template": "/user_avatar/discuss.pytorch.org/blade/{size}/23861_2.png"746          },747          "bookmarked": false,748          "actions_summary": [749            {750              "id": 2,751              "count": 1752            }753          ],754          "moderator": true,755          "admin": true,756          "staff": true,757          "user_id": 211,758          "hidden": false,759          "trust_level": 4,760          "deleted_at": null,761          "user_deleted": false,762          "edit_reason": null,763          "can_view_edit_history": true,764          "wiki": false,765          "post_url": "/t/issue-using-parameters-internal-method/134549/12",766          "can_accept_answer": false,767          "can_unaccept_answer": false,768          "accepted_answer": true,769          "topic_accepted_answer": true770        },771        {772          "id": 313057,773          "name": "",774          "username": "blade",775          "avatar_template": "/user_avatar/discuss.pytorch.org/blade/{size}/23861_2.png",776          "created_at": "2021-10-22T18:00:40.469Z",777          "cooked": "<p>Thanks for the solution! Just for my own understanding, what is <code>params = {k: v.clone() for k, v in params.items()}</code> exactly doing?</p>",778          "post_number": 13,779          "post_type": 1,780          "posts_count": 15,781          "updated_at": "2021-10-22T18:00:40.469Z",782          "reply_count": 1,783          "reply_to_post_number": 12,784          "quote_count": 0,785          "incoming_link_count": 2,786          "reads": 17,787          "readers_count": 16,788          "score": 18.4,789          "yours": false,790          "topic_id": 134549,791          "topic_slug": "issue-using-parameters-internal-method",792          "display_username": "",793          "primary_group_name": null,794          "flair_name": null,795          "flair_url": null,796          "flair_bg_color": null,797          "flair_color": null,798          "flair_group_id": null,799          "badges_granted": [],800          "version": 1,801          "can_edit": false,802          "can_delete": false,803          "can_recover": false,804          "can_see_hidden_post": false,805          "can_wiki": false,806          "read": true,807          "user_title": null,808          "reply_to_user": {809            "id": 211,810            "username": "albanD",811            "name": "Alban D",812            "avatar_template": "/user_avatar/discuss.pytorch.org/alband/{size}/215_2.png"813          },814          "bookmarked": false,815          "actions_summary": [],816          "moderator": false,817          "admin": false,818          "staff": false,819          "user_id": 25189,820          "hidden": false,821          "trust_level": 2,822          "deleted_at": null,823          "user_deleted": false,824          "edit_reason": null,825          "can_view_edit_history": true,826          "wiki": false,827          "post_url": "/t/issue-using-parameters-internal-method/134549/13",828          "can_accept_answer": false,829          "can_unaccept_answer": false,830          "accepted_answer": false,831          "topic_accepted_answer": true832        },833        {834          "id": 313065,835          "name": "Alban D",836          "username": "albanD",837          "avatar_template": "/user_avatar/discuss.pytorch.org/alband/{size}/215_2.png",838          "created_at": "2021-10-22T20:06:38.441Z",839          "cooked": "<p>It is cloning the Tensors inside params. That means that the parameters that get used in the forward have different memory than the ones that got modified inplace by the optimizer.</p>",840          "post_number": 14,841          "post_type": 1,842          "posts_count": 15,843          "updated_at": "2021-10-22T20:06:38.441Z",844          "reply_count": 1,845          "reply_to_post_number": 13,846          "quote_count": 0,847          "incoming_link_count": 1,848          "reads": 16,849          "readers_count": 15,850          "score": 28.2,851          "yours": false,852          "topic_id": 134549,853          "topic_slug": "issue-using-parameters-internal-method",854          "display_username": "Alban D",855          "primary_group_name": null,856          "flair_name": null,857          "flair_url": null,858          "flair_bg_color": null,859          "flair_color": null,860          "flair_group_id": null,861          "badges_granted": [],862          "version": 1,863          "can_edit": false,864          "can_delete": false,865          "can_recover": false,866          "can_see_hidden_post": false,867          "can_wiki": false,868          "read": true,869          "user_title": "",870          "reply_to_user": {871            "id": 25189,872            "username": "blade",873            "name": "",874            "avatar_template": "/user_avatar/discuss.pytorch.org/blade/{size}/23861_2.png"875          },876          "bookmarked": false,877          "actions_summary": [878            {879              "id": 2,880              "count": 1881            }882          ],883          "moderator": true,884          "admin": true,885          "staff": true,886          "user_id": 211,887          "hidden": false,888          "trust_level": 4,889          "deleted_at": null,890          "user_deleted": false,891          "edit_reason": null,892          "can_view_edit_history": true,893          "wiki": false,894          "post_url": "/t/issue-using-parameters-internal-method/134549/14",895          "can_accept_answer": false,896          "can_unaccept_answer": false,897          "accepted_answer": false,898          "topic_accepted_answer": true899        },900        {901          "id": 317397,902          "name": "",903          "username": "blade",904          "avatar_template": "/user_avatar/discuss.pytorch.org/blade/{size}/23861_2.png",905          "created_at": "2021-11-15T19:23:15.667Z",906          "cooked": "<p>I was trying to add a Hebbian learning term (based on which weight update is proportional to the product of pre and post-synaptic activations) to the inner optimization. To that end, I modified the code as following:</p>\n<pre><code class=\"lang-auto\">import torch\nfrom torch import nn, optim\nfrom torch.utils.data import Dataset, DataLoader\n\nfrom torch.nn.utils import _stateless\n\n\nclass MyDataset(Dataset):\n    def __init__(self, N):\n        self.N = N\n        self.x = torch.rand(self.N, 10)\n        self.y = torch.randint(0, 3, (self.N,))\n\n    def __len__(self):\n        return self.N\n\n    def __getitem__(self, idx):\n        return self.x[idx], self.y[idx]\n\n\nclass MyModel(nn.Module):\n    def __init__(self):\n        super(MyModel, self).__init__()\n        self.fc1 = nn.Linear(10, 10)\n        self.fc2 = nn.Linear(10, 3)\n\n        self.relu = nn.ReLU()\n\n        self.alpha = nn.Parameter(torch.randn(1))\n        self.beta = nn.Parameter(torch.randn(1))\n\n    def forward(self, x):\n        y = self.relu(self.fc1(x))\n        return (x, y), self.fc2(y)\n\ndef Optim(params, alpha, beta, y, logits):\n\n    # -- add network output to activations\n    softmax = nn.Softmax(dim=1)\n    activations = []\n    for item in y:\n        activations.append(item)\n    activations.append(softmax(logits))\n\n    i = 0\n    for k, p in params.items():\n        print(k[4:])\n        if k[4:] == 'weight':\n            p.update = - alpha * p.grad + beta * torch.matmul(activations[i+1].T, activations[i])\n            params[k] = p + p.update   # update weight\n        elif k[4:] == 'bias':\n            p.update = - alpha * p.grad + beta * activations[i + 1].squeeze(0)\n            params[k] = p + p.update   # update weight\n            i += 1\n\nepochs = 20\nN = 10\ndataset = DataLoader(dataset=MyDataset(N), batch_size=1)\nmodel = MyModel()\nloss_func = nn.CrossEntropyLoss()\noptim = optim.Adam([model.alpha], lr=1e-3)\ntorch.autograd.set_detect_anomaly(True)\n\nfor i in range(epochs):\n    model.train()\n    train_loss = 0\n    params = dict(model.named_parameters())\n    for batch_idx, (x, y) in enumerate(dataset):\n        params = {k: v.clone() for k, v in params.items()}\n        activations, logits = _stateless.functional_call(model, params, x)             # predict\n        loss_inner = loss_func(logits, y)                                 # loss\n        loss_inner.backward(create_graph=True, inputs=params.values())    # compute grad\n        train_loss += loss_inner.item()                                   # store loss\n        Optim(params, model.alpha, model.beta, activations, logits)\n\n    print('Train Epoch: {}\\tLoss: {:.6f}'.format(i, train_loss / N))\n    activations, logits = _stateless.functional_call(model, params, x)                 # predict\n    loss_meta = loss_func(logits, y)\n    loss_meta.backward()\n    optim.step()\n</code></pre>\n<p>This gives me the error</p>\n<blockquote>\n<p>RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation: [torch.FloatTensor [1]] is at version 11; expected version 10 instead. Hint: the backtrace further above shows the operation that failed to compute its gradient. The variable in question was changed in there or anywhere later. Good luck!</p>\n</blockquote>\n<p>when I change the line</p>\n<pre><code>    Optim(params, model.alpha, model.beta, activations, logits)\n</code></pre>\n<p>to</p>\n<pre><code>    Optim(params, model.alpha, model.beta.clone(), activations, logits)\n</code></pre>\n<p>the problem vanishes. Since <code>model.alpha</code> does not need cloning,</p>\n<ol>\n<li>I’m wondering if using <code>model.beta.clone()</code> is the correct solution?</li>\n<li>Why unlike <code>model.beta</code>, cloning is not needed when passing <code>model.alpha</code> to <code>Optim</code>?</li>\n</ol>",907          "post_number": 15,908          "post_type": 1,909          "posts_count": 15,910          "updated_at": "2021-11-15T21:01:51.611Z",911          "reply_count": 0,912          "reply_to_post_number": 14,913          "quote_count": 0,914          "incoming_link_count": 8,915          "reads": 15,916          "readers_count": 14,917          "score": 43.0,918          "yours": false,919          "topic_id": 134549,920          "topic_slug": "issue-using-parameters-internal-method",921          "display_username": "",922          "primary_group_name": null,923          "flair_name": null,924          "flair_url": null,925          "flair_bg_color": null,926          "flair_color": null,927          "flair_group_id": null,928          "badges_granted": [],929          "version": 2,930          "can_edit": false,931          "can_delete": false,932          "can_recover": false,933          "can_see_hidden_post": false,934          "can_wiki": false,935          "read": true,936          "user_title": null,937          "reply_to_user": {938            "id": 211,939            "username": "albanD",940            "name": "Alban D",941            "avatar_template": "/user_avatar/discuss.pytorch.org/alband/{size}/215_2.png"942          },943          "bookmarked": false,944          "actions_summary": [],945          "moderator": false,946          "admin": false,947          "staff": false,948          "user_id": 25189,949          "hidden": false,950          "trust_level": 2,951          "deleted_at": null,952          "user_deleted": false,953          "edit_reason": null,954          "can_view_edit_history": true,955          "wiki": false,956          "post_url": "/t/issue-using-parameters-internal-method/134549/15",957          "can_accept_answer": false,958          "can_unaccept_answer": false,959          "accepted_answer": false,960          "topic_accepted_answer": true961        }962      ],963      "stream": [964        312298,965        312309,966        312311,967        312322,968        312499,969        312505,970        312507,971        312528,972        312530,973        312550,974        312687,975        312872,976        313057,977        313065,978        317397979      ]980    },981    "timeline_lookup": [982      [983        1,984        1468985      ],986      [987        5,988        1467989      ],990      [991        11,992        1466993      ],994      [995        12,996        1465997      ],998      [999        13,1000        14641001      ],1002      [1003        15,1004        14401005      ]1006    ],1007    "suggested_topics": [1008      {1009        "fancy_title": "Pytorch on 3.10 python version of jetson orin",1010        "id": 216032,1011        "title": "Pytorch on 3.10 python version of jetson orin",1012        "slug": "pytorch-on-3-10-python-version-of-jetson-orin",1013        "posts_count": 3,1014        "reply_count": 1,1015        "highest_post_number": 3,1016        "image_url": null,1017        "created_at": "2025-01-29T19:13:23.937Z",1018        "last_posted_at": "2025-01-29T21:26:40.385Z",1019        "bumped": true,1020        "bumped_at": "2025-01-29T21:37:17.202Z",1021        "archetype": "regular",1022        "unseen": false,1023        "pinned": false,1024        "unpinned": null,1025        "visible": true,1026        "closed": false,1027        "archived": false,1028        "bookmarked": null,1029        "liked": null,1030        "tags_descriptions": {},1031        "like_count": 0,1032        "views": 398,1033        "category_id": 1,1034        "featured_link": null,1035        "has_accepted_answer": false,1036        "posters": [1037          {1038            "extras": "latest",1039            "description": "Original Poster, Most Recent Poster",1040            "user": {1041              "id": 82374,1042              "username": "Vaibhavi_Kavathekar",1043              "name": "Vaibhavi Kavathekar",1044              "avatar_template": "/user_avatar/discuss.pytorch.org/vaibhavi_kavathekar/{size}/75361_2.png",1045              "trust_level": 01046            }1047          },1048          {1049            "extras": null,1050            "description": "Frequent Poster",1051            "user": {1052              "id": 3534,1053              "username": "ptrblck",1054              "name": "",1055              "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",1056              "admin": true,1057              "moderator": true,1058              "trust_level": 21059            }1060          }1061        ]1062      },1063      {1064        "fancy_title": "How to do finetune traning with BatchNorm2d inside?",1065        "id": 212196,1066        "title": "How to do finetune traning with BatchNorm2d inside?",1067        "slug": "how-to-do-finetune-traning-with-batchnorm2d-inside",1068        "posts_count": 6,1069        "reply_count": 4,1070        "highest_post_number": 6,1071        "image_url": null,1072        "created_at": "2024-10-28T08:29:41.455Z",1073        "last_posted_at": "2024-10-29T09:23:11.640Z",1074        "bumped": true,1075        "bumped_at": "2024-10-29T09:23:11.640Z",1076        "archetype": "regular",1077        "unseen": false,1078        "pinned": false,1079        "unpinned": null,1080        "visible": true,1081        "closed": false,1082        "archived": false,1083        "bookmarked": null,1084        "liked": null,1085        "tags_descriptions": {},1086        "like_count": 0,1087        "views": 86,1088        "category_id": 1,1089        "featured_link": null,1090        "has_accepted_answer": true,1091        "posters": [1092          {1093            "extras": "latest",1094            "description": "Original Poster, Most Recent Poster, Accepted Answer",1095            "user": {1096              "id": 56566,1097              "username": "JohnHerry",1098              "name": "John Herry",1099              "avatar_template": "/user_avatar/discuss.pytorch.org/johnherry/{size}/50337_2.png",1100              "trust_level": 11101            }1102          },1103          {1104            "extras": null,1105            "description": "Frequent Poster",1106            "user": {1107              "id": 3534,1108              "username": "ptrblck",1109              "name": "",1110              "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",1111              "admin": true,1112              "moderator": true,1113              "trust_level": 21114            }1115          }1116        ]1117      },1118      {1119        "fancy_title": "Ubuntu 20.04 end of life",1120        "id": 213806,1121        "title": "Ubuntu 20.04 end of life",1122        "slug": "ubuntu-20-04-end-of-life",1123        "posts_count": 1,1124        "reply_count": 0,1125        "highest_post_number": 1,1126        "image_url": null,1127        "created_at": "2024-12-04T17:07:24.555Z",1128        "last_posted_at": "2024-12-04T17:07:24.603Z",1129        "bumped": true,1130        "bumped_at": "2024-12-04T17:07:24.603Z",1131        "archetype": "regular",1132        "unseen": false,1133        "pinned": false,1134        "unpinned": null,1135        "visible": true,1136        "closed": false,1137        "archived": false,1138        "bookmarked": null,1139        "liked": null,1140        "tags_descriptions": {},1141        "like_count": 0,1142        "views": 23,1143        "category_id": 1,1144        "featured_link": null,1145        "has_accepted_answer": false,1146        "posters": [1147          {1148            "extras": "latest single",1149            "description": "Original Poster, Most Recent Poster",1150            "user": {1151              "id": 55060,1152              "username": "eleven",1153              "name": "",1154              "avatar_template": "/user_avatar/discuss.pytorch.org/eleven/{size}/48695_2.png",1155              "trust_level": 11156            }1157          }1158        ]1159      },1160      {1161        "fancy_title": "Parameter loading",1162        "id": 212327,1163        "title": "Parameter loading",1164        "slug": "parameter-loading",1165        "posts_count": 6,1166        "reply_count": 5,1167        "highest_post_number": 7,1168        "image_url": null,1169        "created_at": "2024-10-30T19:55:47.573Z",1170        "last_posted_at": "2024-11-01T18:55:59.308Z",1171        "bumped": true,1172        "bumped_at": "2024-11-01T18:55:59.308Z",1173        "archetype": "regular",1174        "unseen": false,1175        "pinned": false,1176        "unpinned": null,1177        "visible": true,1178        "closed": false,1179        "archived": false,1180        "bookmarked": null,1181        "liked": null,1182        "tags_descriptions": {},1183        "like_count": 0,1184        "views": 249,1185        "category_id": 1,1186        "featured_link": null,1187        "has_accepted_answer": false,1188        "posters": [1189          {1190            "extras": null,1191            "description": "Original Poster",1192            "user": {1193              "id": 34549,1194              "username": "yichao_Liu",1195              "name": "yichao Liu",1196              "avatar_template": "/user_avatar/discuss.pytorch.org/yichao_liu/{size}/18684_2.png",1197              "trust_level": 11198            }1199          },1200          {

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