CoolFace
Datasetpublic

Anurag1734/cuda-error-resolution-analysis

sourceHugging Faceupdated 2mo agoView on Hugging Face
0likes7downloads
topics_batch_196.json70235 linesDownload Raw Back to raw
1[2  {3    "post_stream": {4      "posts": [5        {6          "id": 369159,7          "name": "narges poorkamali",8          "username": "narges_poorkamali",9          "avatar_template": "/user_avatar/discuss.pytorch.org/narges_poorkamali/{size}/53792_2.png",10          "created_at": "2022-10-06T06:54:35.722Z",11          "cooked": "<p>I use sigmoid function in my last layer. we know that sigmoid function, limits the outputs of network in range (0,1). I want <strong>most of the outputs</strong> to be in range (0, 0.5) and <strong>very few of them</strong> to be in range [0.5, 1). How can I do this in Pytorch to get the desired output?</p>\n<p>The following Pytorch code snippet is related to this question:</p>\n<pre><code class=\"lang-auto\">class Generator(nn.Module):\ndef __init__(self):\n    super(Generator, self).__init__()\n    #\n    def block(in_feat, out_feat, normalize=True):\n        layers = [nn.Linear(in_features=in_feat, out_features=out_feat)]\n        if normalize:\n            layers.append(nn.BatchNorm1d(out_feat))\n        layers.append(nn.LeakyReLU(0.2, inplace=True))\n        return layers\n    # now we can use this function like below:\n    self.model = nn.Sequential(*block(params.input_dim_generator, 500, normalize=False),\n                               *block(500, 350),\n                               *block(350, 256),\n                               nn.Linear(256, 564),\n                               nn.Sigmoid())\n\n# forward\n    def forward(self, old_vector, z):\n        vector_app = torch.cat((old_vector, z), dim=1)\n        new_vector = self.model(vector_app)\n        new_result = torch.max(new_vector, old_vector).float()\n        return new_result\n</code></pre>\n<pre><code class=\"lang-auto\">\n\n\n</code></pre>\n<p>z is a random noise vector in range (0,1) and old_vector is a binary vector(the values are 0 or 1).<br>\nI use uniform distribution to generate random noise vector. z = torch.rand(old_vector.shape[0], params.noise_dim). The shape of old_vector is [160, 564] and the size of params.noise_dim is 70.</p>\n<p>the output of this model is:</p>\n<pre><code class=\"lang-auto\">\n\n</code></pre>\n<pre><code class=\"lang-auto\">new_result = torch.tensor([0.5167, 0.5281, 0.5804, 0.4372, 1.0000, 1.0000, 1.0000, 0.5501, 1.0000,\n        0.6154, 1.0000, 1.0000, 0.4699, 0.5536, 0.5005, 0.4318, 0.5302, 0.4830,\n        0.5404, 0.3597, 0.4639, 0.5885, 0.4997, 0.5881, 0.5046, 0.5670, 0.3977,\n        0.5186, 0.5859, 0.5398, 0.3954, 0.4839, 0.3310, 0.5208, 0.5420, 0.5056,\n        0.5022, 0.6316, 0.6185, 0.5142, 0.5536, 0.4988, 0.5250, 0.4813, 0.5150,\n        0.4080, 1.0000, 1.0000, 1.0000, 0.6054, 0.4766, 0.4423, 0.4520, 0.4816,\n        0.5159, 0.4582, 1.0000, 0.4550, 0.4956, 1.0000, 0.5934, 1.0000, 0.4809,\n        0.5512, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, 0.4024, 0.4822, 1.0000,\n        0.5310, 1.0000, 0.5127, 1.0000, 0.5441, 0.5063, 1.0000, 0.5511, 0.5544,\n        1.0000, 0.4585, 0.5211, 0.5758, 0.4355, 1.0000, 0.5297, 0.4582, 0.4170,\n        1.0000, 1.0000, 0.5257, 0.4194, 0.3583, 0.5087, 0.5936, 0.4851, 0.5697,\n        0.4261, 0.4736, 0.4551, 1.0000, 0.5667, 0.5650, 1.0000, 0.5069, 0.5901,\n        0.4980, 0.5184, 1.0000, 1.0000, 0.5435, 1.0000, 1.0000, 1.0000, 1.0000,\n        0.4521, 1.0000, 0.4509, 1.0000, 0.5067, 1.0000, 0.4152, 0.5034, 0.5735,\n        0.4040, 1.0000, 0.4492, 1.0000, 0.4405, 1.0000, 1.0000, 0.5667, 0.5639,\n        0.4013, 0.4357, 0.4437, 0.4510, 0.4225, 0.5091, 0.5057, 1.0000, 0.5237,\n        0.5098, 1.0000, 0.4216, 0.5242, 0.5335, 0.3916, 0.4938, 1.0000, 0.4070,\n        0.5210, 1.0000, 1.0000, 0.4050, 0.3960, 0.5750, 0.4906, 0.4991, 1.0000,\n        0.3149, 0.2949, 1.0000, 0.4515, 0.3627, 0.4348, 0.3887, 0.5807, 0.5787,\n        0.5781, 1.0000, 1.0000, 1.0000, 1.0000, 0.4919, 1.0000, 1.0000, 0.5554,\n        0.5515, 1.0000, 0.5472, 0.3342, 0.5705, 0.5076, 0.6348, 0.4436, 0.4683,\n        0.4228, 0.6506, 0.4540, 0.5333, 0.4512, 0.6037, 0.5173, 1.0000, 0.4466,\n        0.5644, 0.5565, 0.5141, 0.4771, 0.5822, 0.4888, 1.0000, 0.6331, 0.6435,\n        1.0000, 0.5012, 1.0000, 0.4864, 1.0000, 0.4994, 0.4326, 0.4347, 0.3606,\n        0.5829, 0.5229, 1.0000, 0.5992, 0.5883, 0.4825, 0.6254, 0.4951, 0.4285,\n        0.4982, 1.0000, 0.5847, 0.4131, 0.5194, 0.5270, 0.4856, 0.6182, 0.5578,\n        1.0000, 0.5460, 0.5023, 0.6279, 0.5727, 0.5997, 0.4903, 0.5633, 0.5070,\n        0.5013, 1.0000, 0.4179, 0.5529, 0.6254, 0.5767, 0.3939, 0.5791, 0.4936,\n        0.4714, 0.5150, 0.5717, 0.4570, 0.4463, 0.5493, 0.5179, 1.0000, 0.5682,\n        0.5451, 0.5266, 0.5571, 1.0000, 1.0000, 0.5506, 0.4710, 0.5951, 1.0000,\n        0.5027, 1.0000, 1.0000, 0.4960, 0.6269, 0.4817, 1.0000, 0.4059, 0.4787,\n        0.4419, 0.5479, 0.4830, 0.4709, 0.6106, 0.6154, 0.3958, 0.6434, 0.4626,\n        0.5954, 0.5083, 0.5121, 1.0000, 0.5139, 1.0000, 0.5428, 1.0000, 0.5278,\n        0.5255, 0.5854, 0.4400, 0.4774, 0.4431, 0.4871, 0.3854, 0.6217, 0.5562,\n        0.4461, 0.5191, 0.5654, 0.4428, 0.5503, 0.5742, 1.0000, 0.4899, 1.0000,\n        0.5229, 0.5428, 0.4285, 0.3038, 0.3029, 0.5145, 0.6747, 0.5685, 0.5268,\n        0.4888, 0.6431, 0.5308, 0.6249, 0.4531, 0.5631, 0.4498, 0.4465, 0.5125,\n        0.5610, 1.0000, 0.5033, 0.5517, 1.0000, 0.4625, 0.5095, 1.0000, 0.3415,\n        0.4749, 1.0000, 0.4567, 1.0000, 0.4417, 0.5623, 1.0000, 0.4780, 0.4218,\n        1.0000, 0.5474, 0.6514, 0.5725, 0.4219, 0.5303, 0.3375, 0.5710, 0.5507,\n        0.3698, 0.4902, 0.6082, 0.5212, 0.5606, 0.5320, 0.4893, 0.3831, 0.4605,\n        0.5409, 0.4605, 0.5774, 0.5709, 0.5020, 0.5771, 0.4032, 0.5832, 0.4454,\n        0.4572, 0.4651, 0.4752, 0.5786, 0.4700, 0.3398, 0.4143, 0.4413, 0.4020,\n        0.6390, 0.5165, 0.4871, 0.6229, 0.4915, 1.0000, 0.4780, 0.5900, 0.4847,\n        0.4583, 0.5889, 0.4291, 0.4095, 0.5258, 1.0000, 0.4875, 1.0000, 0.5174,\n        0.4302, 1.0000, 0.5058, 0.5917, 0.5395, 0.3915, 0.4775, 0.4688, 0.4860,\n        0.4869, 0.4189, 1.0000, 0.6453, 0.4652, 0.5106, 0.4336, 0.4959, 0.5144,\n        1.0000, 1.0000, 0.4382, 0.5917, 1.0000, 0.5123, 0.4299, 0.5447, 1.0000,\n        0.5316, 0.4145, 0.5741, 1.0000, 0.4581, 0.5953, 1.0000, 0.4909, 0.3703,\n        0.3851, 0.5324, 1.0000, 0.6660, 1.0000, 0.5687, 0.4825, 0.5081, 0.5052,\n        0.6288, 0.5371, 0.4286, 1.0000, 0.6535, 0.5556, 0.5390, 0.3320, 1.0000,\n        0.6431, 0.5405, 1.0000, 0.3641, 0.4390, 0.6196, 0.4720, 0.5114, 0.4844,\n        0.4184, 0.6269, 1.0000, 0.4077, 0.3950, 0.4502, 1.0000, 0.4417, 0.4329,\n        0.5803, 0.4967, 0.5248, 0.5182, 0.4417, 0.4066, 0.6219, 0.3435, 1.0000,\n        0.4680, 1.0000, 0.5403, 0.4570, 1.0000, 0.5805, 1.0000, 0.5796, 0.5100,\n        0.6487, 0.4752, 0.4579, 0.6026, 0.5964, 0.5842, 0.3423, 0.5475, 0.4467,\n        0.4494, 0.4782, 0.6054, 0.4499, 0.4691, 0.4700, 0.5006, 0.5895, 0.3947,\n        0.5517, 0.4240, 0.5286, 0.4796, 0.5116, 0.5696, 0.4369, 0.4761, 0.5444,\n        0.4490, 0.6399, 0.5469, 0.5155, 0.5339, 0.5860, 0.6092, 0.4000, 0.4622,\n        0.4235, 0.5554, 0.4088, 0.5798, 0.5034, 0.4752, 0.4337, 0.4786, 0.5766,\n        0.4569, 0.5401, 0.4903, 0.4243, 0.3825, 0.6652, 0.4780, 0.5335, 0.4415,\n        0.5478, 0.3797, 1.0000, 0.6133, 0.5824, 0.4292, 0.5182, 0.3953, 0.5071,\n        0.5131, 0.4735, 1.0000, 0.3457, 0.5933, 0.5329])\n</code></pre>\n<pre><code class=\"lang-auto\"></code></pre>",12          "post_number": 1,13          "post_type": 1,14          "posts_count": 1,15          "updated_at": "2022-10-06T07:14:27.508Z",16          "reply_count": 0,17          "reply_to_post_number": null,18          "quote_count": 0,19          "incoming_link_count": 141,20          "reads": 6,21          "readers_count": 5,22          "score": 706.2,23          "yours": false,24          "topic_id": 162913,25          "topic_slug": "how-to-get-most-of-the-outputs-of-the-sigmoid-function-in-the-range-0-0-5",26          "display_username": "narges poorkamali",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          "read": true,41          "user_title": null,42          "bookmarked": false,43          "actions_summary": [],44          "moderator": false,45          "admin": false,46          "staff": false,47          "user_id": 59893,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/how-to-get-most-of-the-outputs-of-the-sigmoid-function-in-the-range-0-0-5/162913/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      "stream": [64        36915965      ]66    },67    "timeline_lookup": [68      [69        1,70        111671      ]72    ],73    "suggested_topics": [74      {75        "fancy_title": "Torch svd grad show all zero, when only use Vt[-1]",76        "id": 215307,77        "title": "Torch svd grad show all zero, when only use Vt[-1]",78        "slug": "torch-svd-grad-show-all-zero-when-only-use-vt-1",79        "posts_count": 2,80        "reply_count": 0,81        "highest_post_number": 2,82        "image_url": null,83        "created_at": "2025-01-13T04:25:23.822Z",84        "last_posted_at": "2025-01-14T19:59:03.630Z",85        "bumped": true,86        "bumped_at": "2025-01-14T19:59:03.630Z",87        "archetype": "regular",88        "unseen": false,89        "pinned": false,90        "unpinned": null,91        "visible": true,92        "closed": false,93        "archived": false,94        "bookmarked": null,95        "liked": null,96        "tags_descriptions": {},97        "like_count": 0,98        "views": 61,99        "category_id": 1,100        "featured_link": null,101        "has_accepted_answer": false,102        "posters": [103          {104            "extras": null,105            "description": "Original Poster",106            "user": {107              "id": 82045,108              "username": "yangtaodummt",109              "name": "Yangtaodummt",110              "avatar_template": "/user_avatar/discuss.pytorch.org/yangtaodummt/{size}/75071_2.png",111              "trust_level": 0112            }113          },114          {115            "extras": "latest",116            "description": "Most Recent Poster",117            "user": {118              "id": 18088,119              "username": "KFrank",120              "name": "K. Frank",121              "avatar_template": "/letter_avatar_proxy/v4/letter/k/ecb155/{size}.png",122              "trust_level": 2123            }124          }125        ]126      },127      {128        "fancy_title": "Running Pytorch 1.13 on H100",129        "id": 212333,130        "title": "Running Pytorch 1.13 on H100",131        "slug": "running-pytorch-1-13-on-h100",132        "posts_count": 6,133        "reply_count": 4,134        "highest_post_number": 6,135        "image_url": null,136        "created_at": "2024-10-30T23:18:12.056Z",137        "last_posted_at": "2024-11-16T14:28:04.330Z",138        "bumped": true,139        "bumped_at": "2024-11-16T14:28:04.330Z",140        "archetype": "regular",141        "unseen": false,142        "pinned": false,143        "unpinned": null,144        "visible": true,145        "closed": false,146        "archived": false,147        "bookmarked": null,148        "liked": null,149        "tags_descriptions": {},150        "like_count": 0,151        "views": 577,152        "category_id": 1,153        "featured_link": null,154        "has_accepted_answer": false,155        "posters": [156          {157            "extras": null,158            "description": "Original Poster",159            "user": {160              "id": 2920,161              "username": "Sia_Rezaei",162              "name": "Sia Rezaei",163              "avatar_template": "/user_avatar/discuss.pytorch.org/sia_rezaei/{size}/43436_2.png",164              "trust_level": 2165            }166          },167          {168            "extras": null,169            "description": "Frequent Poster",170            "user": {171              "id": 80949,172              "username": "Yangqi_Long",173              "name": "Yangqi Long",174              "avatar_template": "/user_avatar/discuss.pytorch.org/yangqi_long/{size}/74032_2.png",175              "trust_level": 0176            }177          },178          {179            "extras": "latest",180            "description": "Most Recent Poster",181            "user": {182              "id": 3534,183              "username": "ptrblck",184              "name": "",185              "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",186              "admin": true,187              "moderator": true,188              "trust_level": 2189            }190          }191        ]192      },193      {194        "fancy_title": "How to checkpoint/pickle FlexAttention with sliding window mask",195        "id": 215825,196        "title": "How to checkpoint/pickle FlexAttention with sliding window mask",197        "slug": "how-to-checkpoint-pickle-flexattention-with-sliding-window-mask",198        "posts_count": 1,199        "reply_count": 0,200        "highest_post_number": 1,201        "image_url": null,202        "created_at": "2025-01-24T13:10:48.413Z",203        "last_posted_at": "2025-01-24T13:10:48.453Z",204        "bumped": true,205        "bumped_at": "2025-01-24T13:10:48.453Z",206        "archetype": "regular",207        "unseen": false,208        "pinned": false,209        "unpinned": null,210        "visible": true,211        "closed": false,212        "archived": false,213        "bookmarked": null,214        "liked": null,215        "tags_descriptions": {},216        "like_count": 0,217        "views": 93,218        "category_id": 1,219        "featured_link": null,220        "has_accepted_answer": false,221        "posters": [222          {223            "extras": "latest single",224            "description": "Original Poster, Most Recent Poster",225            "user": {226              "id": 82293,227              "username": "cathal",228              "name": "",229              "avatar_template": "/letter_avatar_proxy/v4/letter/c/df788c/{size}.png",230              "trust_level": 1231            }232          }233        ]234      },235      {236        "fancy_title": "RAM speed on Windows 11",237        "id": 216990,238        "title": "RAM speed on Windows 11",239        "slug": "ram-speed-on-windows-11",240        "posts_count": 2,241        "reply_count": 1,242        "highest_post_number": 2,243        "image_url": null,244        "created_at": "2025-02-21T13:52:20.546Z",245        "last_posted_at": "2025-02-21T13:56:13.559Z",246        "bumped": true,247        "bumped_at": "2025-02-22T05:04:55.924Z",248        "archetype": "regular",249        "unseen": false,250        "pinned": false,251        "unpinned": null,252        "visible": true,253        "closed": false,254        "archived": false,255        "bookmarked": null,256        "liked": null,257        "tags_descriptions": {},258        "like_count": 0,259        "views": 45,260        "category_id": 1,261        "featured_link": null,262        "has_accepted_answer": false,263        "posters": [264          {265            "extras": null,266            "description": "Original Poster",267            "user": {268              "id": 82814,269              "username": "Erislynch",270              "name": "Eris Lynch",271              "avatar_template": "/user_avatar/discuss.pytorch.org/erislynch/{size}/75793_2.png",272              "trust_level": 0273            }274          },275          {276            "extras": "latest",277            "description": "Most Recent Poster",278            "user": {279              "id": 3534,280              "username": "ptrblck",281              "name": "",282              "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",283              "admin": true,284              "moderator": true,285              "trust_level": 2286            }287          }288        ]289      },290      {291        "fancy_title": "This is about optimizing cuDNN to avoid rebuilding the graph when batch, input dimensions change.",292        "id": 217915,293        "title": "This is about optimizing cuDNN to avoid rebuilding the graph when batch, input dimensions change.",294        "slug": "this-is-about-optimizing-cudnn-to-avoid-rebuilding-the-graph-when-batch-input-dimensions-change",295        "posts_count": 1,296        "reply_count": 0,297        "highest_post_number": 1,298        "image_url": null,299        "created_at": "2025-03-16T13:59:44.870Z",300        "last_posted_at": "2025-03-16T13:59:44.902Z",301        "bumped": true,302        "bumped_at": "2025-03-16T13:59:44.902Z",303        "archetype": "regular",304        "unseen": false,305        "pinned": false,306        "unpinned": null,307        "visible": true,308        "closed": false,309        "archived": false,310        "bookmarked": null,311        "liked": null,312        "tags_descriptions": {},313        "like_count": 0,314        "views": 36,315        "category_id": 1,316        "featured_link": null,317        "has_accepted_answer": false,318        "posters": [319          {320            "extras": "latest single",321            "description": "Original Poster, Most Recent Poster",322            "user": {323              "id": 83303,324              "username": "yhyang201",325              "name": "",326              "avatar_template": "/user_avatar/discuss.pytorch.org/yhyang201/{size}/76189_2.png",327              "trust_level": 0328            }329          }330        ]331      }332    ],333    "tags_descriptions": {},334    "fancy_title": "How to get most of the outputs of the sigmoid function in the range (0, 0.5)?",335    "id": 162913,336    "title": "How to get most of the outputs of the sigmoid function in the range (0, 0.5)?",337    "posts_count": 1,338    "created_at": "2022-10-06T06:54:35.599Z",339    "views": 552,340    "reply_count": 0,341    "like_count": 0,342    "last_posted_at": "2022-10-06T06:54:35.722Z",343    "visible": true,344    "closed": false,345    "archived": false,346    "has_summary": false,347    "archetype": "regular",348    "slug": "how-to-get-most-of-the-outputs-of-the-sigmoid-function-in-the-range-0-0-5",349    "category_id": 1,350    "word_count": 1356,351    "deleted_at": null,352    "user_id": 59893,353    "featured_link": null,354    "pinned_globally": false,355    "pinned_at": null,356    "pinned_until": null,357    "image_url": null,358    "slow_mode_seconds": 0,359    "draft": null,360    "draft_key": "topic_162913",361    "draft_sequence": null,362    "unpinned": null,363    "pinned": false,364    "current_post_number": 1,365    "highest_post_number": 1,366    "deleted_by": null,367    "actions_summary": [368      {369        "id": 4,370        "count": 0,371        "hidden": false,372        "can_act": false373      },374      {375        "id": 8,376        "count": 0,377        "hidden": false,378        "can_act": false379      },380      {381        "id": 10,382        "count": 0,383        "hidden": false,384        "can_act": false385      },386      {387        "id": 7,388        "count": 0,389        "hidden": false,390        "can_act": false391      }392    ],393    "chunk_size": 20,394    "bookmarked": false,395    "topic_timer": null,396    "message_bus_last_id": 0,397    "participant_count": 1,398    "show_read_indicator": false,399    "thumbnails": null,400    "slow_mode_enabled_until": null,401    "can_vote": false,402    "vote_count": 0,403    "user_voted": false,404    "discourse_zendesk_plugin_zendesk_id": null,405    "discourse_zendesk_plugin_zendesk_url": "https://your-url.zendesk.com/agent/tickets/",406    "details": {407      "can_edit": false,408      "notification_level": 1,409      "participants": [410        {411          "id": 59893,412          "username": "narges_poorkamali",413          "name": "narges poorkamali",414          "avatar_template": "/user_avatar/discuss.pytorch.org/narges_poorkamali/{size}/53792_2.png",415          "post_count": 1,416          "primary_group_name": null,417          "flair_name": null,418          "flair_url": null,419          "flair_color": null,420          "flair_bg_color": null,421          "flair_group_id": null,422          "trust_level": 1423        }424      ],425      "created_by": {426        "id": 59893,427        "username": "narges_poorkamali",428        "name": "narges poorkamali",429        "avatar_template": "/user_avatar/discuss.pytorch.org/narges_poorkamali/{size}/53792_2.png"430      },431      "last_poster": {432        "id": 59893,433        "username": "narges_poorkamali",434        "name": "narges poorkamali",435        "avatar_template": "/user_avatar/discuss.pytorch.org/narges_poorkamali/{size}/53792_2.png"436      }437    },438    "bookmarks": []439  },440  {441    "post_stream": {442      "posts": [443        {444          "id": 369085,445          "name": "Philippe JUHEL",446          "username": "Philippe_JUHEL",447          "avatar_template": "/user_avatar/discuss.pytorch.org/philippe_juhel/{size}/53773_2.png",448          "created_at": "2022-10-05T19:48:59.298Z",449          "cooked": "<p>Hi,</p>\n<p>Here’re 2 regression programs with the same sets of data and the same basic model (2 inputs and 1 outpu):</p>\n<p>Program 1 :</p>\n<pre><code class=\"lang-auto\">import numpy as np\nimport torch\nimport time\n\n# Define the model\ndef model(x):\n    return x @ w.t() + b\n\n# MSE loss\ndef mse(t1, t2):\n    diff = t1 - t2\n    return torch.sum(diff * diff) / diff.numel()\n\ndef fit(num_epochs, model, loss_fn, w, b):\n    for i in range(num_epochs):\n        preds = model(inputs)\n        loss = loss_fn(preds, targets)\n        loss.backward()\n        with torch.no_grad():\n            w -= w.grad * lr\n            b -= b.grad * lr\n            w.grad.zero_()\n            b.grad.zero_()\n\nlr = 1e-3\nnb_epochs = 1000\n\nnb_data = 1000\nmin_x = 2.0\nmax_x = 3.0\nmin_y = 5.0\nmax_y = 9.0\n\nX = np.linspace(min_x, max_x, num=nb_data, dtype=np.float32)\nY = np.linspace(min_y, max_y, num=nb_data, dtype=np.float32)\ninputs = np.stack((X, Y), axis=1)\ntargets = X + Y\ntargets = targets.reshape(targets.size, 1)\n\n# Convert inputs and targets to tensors\ninputs = torch.from_numpy(inputs)\ntargets = torch.from_numpy(targets)\n\n# Weights and biases\nw = torch.randn(1, 2, requires_grad=True)\nb = torch.randn(1, requires_grad=True)\n\nbegin = time.time()\nfit(nb_epochs, model, mse, w, b)\nend = time.time()\nprint(f\"Duration = {end-begin} s\")\n\n# Calculate loss\npreds = model(inputs)\nloss = mse(preds, targets)\nprint(f\"Loss = {loss}\")\n\n# Calculate a prediction\npred_y = model(torch.Tensor([[2.5, 6]]))\nprint(\"predict \", pred_y.item(), \" should be ===&gt;\",8.5 )\ntype or paste code here\n</code></pre>\n<p>Program 2 :</p>\n<pre><code class=\"lang-auto\">import torch.nn as nn\nimport torch\nimport numpy as np\nfrom torch.utils.data import TensorDataset, DataLoader\nimport torch.nn.functional as F\nimport time\n\n# Define a utility function to train the model\ndef fit(num_epochs, model, loss_fn, opt):\n    for epoch in range(num_epochs):\n        for xb,yb in train_dl:\n            # Generate predictions\n            pred = model(xb)\n            loss = loss_fn(pred, yb)\n            # Perform gradient descent\n            loss.backward()\n            opt.step()\n            opt.zero_grad()\n\ndevice = \"cpu\"\n#device = \"cuda:0\"\n\nlr = 1e-3\nbatch_size = 100\nnb_epochs = 1000\n\nnb_data = 1000\nmin_x = 2.0\nmax_x = 3.0\nmin_y = 5.0\nmax_y = 9.0\n\nX = np.linspace(min_x, max_x, num=nb_data, dtype=np.float32)\nY = np.linspace(min_y, max_y, num=nb_data, dtype=np.float32)\ninputs = np.stack((X, Y), axis=1)\ntargets = X + Y\ntargets = targets.reshape(targets.size, 1)\n\ninputs = torch.from_numpy(inputs).to(device)\ntargets = torch.from_numpy(targets).to(device)\n\ntrain_ds = TensorDataset(inputs, targets)\n# Define data loader\ntrain_dl = DataLoader(train_ds, batch_size, shuffle=True)\n\n# Define model, 2 inputs, 1 output\nmodel = nn.Linear(2, 1).to(device)\n# Define optimizer\nopt = torch.optim.SGD(model.parameters(), lr=lr)\n# Define loss function\nloss_fn = F.mse_loss\n\n# Train the model for some epochs\nbegin = time.time()\nfit(nb_epochs, model, loss_fn, opt)\nend = time.time()\nprint(f\"Duration = {end-begin} s\")\n\n# Calculate final loss\npreds = model(inputs)\nloss = loss_fn(preds, targets)\nprint(f\"Loss = {loss}\")\n\n# Evaluate a prediction\npred_y = model(torch.Tensor([[2.5, 6]]).to(device))\nprint(\"predict \", pred_y.item(), \" should be ===&gt;\",8.5 )\n\n</code></pre>\n<p>They have the same number of data (1000) and the same number of epochs (1000)</p>\n<p>When I run these programs on the same machine (Ubuntu 20.04, 32Gb, core I7, NVIDIA 2080, torch 1.12.1 ), here are the duration for the training (<strong>fit</strong> function) :</p>\n<p>program 1 : 0.25s<br>\nprogram 2 (on CPU) : 8.5s<br>\nprogram 2 (on GPU) : 11.8s</p>\n<p>Why a so big difference between program 1 and program 2? And for program 2 with GPU, why is it worst than with CPU?</p>\n<p>Regards,</p>\n<p>Philippe</p>",450          "post_number": 1,451          "post_type": 1,452          "posts_count": 6,453          "updated_at": "2022-10-05T19:48:59.298Z",454          "reply_count": 0,455          "reply_to_post_number": null,456          "quote_count": 0,457          "incoming_link_count": 58,458          "reads": 8,459          "readers_count": 7,460          "score": 291.6,461          "yours": false,462          "topic_id": 162878,463          "topic_slug": "strange-difference-in-performance-between-2-regression-programs",464          "display_username": "Philippe JUHEL",465          "primary_group_name": null,466          "flair_name": null,467          "flair_url": null,468          "flair_bg_color": null,469          "flair_color": null,470          "flair_group_id": null,471          "badges_granted": [],472          "version": 1,473          "can_edit": false,474          "can_delete": false,475          "can_recover": false,476          "can_see_hidden_post": false,477          "can_wiki": false,478          "read": true,479          "user_title": null,480          "bookmarked": false,481          "actions_summary": [],482          "moderator": false,483          "admin": false,484          "staff": false,485          "user_id": 59880,486          "hidden": false,487          "trust_level": 1,488          "deleted_at": null,489          "user_deleted": false,490          "edit_reason": null,491          "can_view_edit_history": true,492          "wiki": false,493          "post_url": "/t/strange-difference-in-performance-between-2-regression-programs/162878/1",494          "can_accept_answer": false,495          "can_unaccept_answer": false,496          "accepted_answer": false,497          "topic_accepted_answer": null,498          "can_vote": false499        },500        {501          "id": 369137,502          "name": "",503          "username": "ptrblck",504          "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",505          "created_at": "2022-10-06T06:10:58.082Z",506          "cooked": "<p>Your model is tiny as it’s a single operation/layer and you are most likely seeing the overhead of creating the <code>DataLoader</code>, shuffling the data, etc.<br>\nYou can profile parts of your code to narrow down where the slowdown is coming from.<br>\nJust executing the <code>DataLoader</code> on my system takes a few seconds for 1000 epochs.</p>",507          "post_number": 2,508          "post_type": 1,509          "posts_count": 6,510          "updated_at": "2022-10-06T06:10:58.082Z",511          "reply_count": 0,512          "reply_to_post_number": null,513          "quote_count": 0,514          "incoming_link_count": 1,515          "reads": 8,516          "readers_count": 7,517          "score": 6.6,518          "yours": false,519          "topic_id": 162878,520          "topic_slug": "strange-difference-in-performance-between-2-regression-programs",521          "display_username": "",522          "primary_group_name": null,523          "flair_name": null,524          "flair_url": null,525          "flair_bg_color": null,526          "flair_color": null,527          "flair_group_id": null,528          "badges_granted": [],529          "version": 1,530          "can_edit": false,531          "can_delete": false,532          "can_recover": false,533          "can_see_hidden_post": false,534          "can_wiki": false,535          "read": true,536          "user_title": "",537          "bookmarked": false,538          "actions_summary": [],539          "moderator": true,540          "admin": true,541          "staff": true,542          "user_id": 3534,543          "hidden": false,544          "trust_level": 2,545          "deleted_at": null,546          "user_deleted": false,547          "edit_reason": null,548          "can_view_edit_history": true,549          "wiki": false,550          "post_url": "/t/strange-difference-in-performance-between-2-regression-programs/162878/2",551          "can_accept_answer": false,552          "can_unaccept_answer": false,553          "accepted_answer": false,554          "topic_accepted_answer": null555        },556        {557          "id": 369155,558          "name": "Philippe JUHEL",559          "username": "Philippe_JUHEL",560          "avatar_template": "/user_avatar/discuss.pytorch.org/philippe_juhel/{size}/53773_2.png",561          "created_at": "2022-10-06T06:37:46.699Z",562          "cooked": "<p>Thank you for your answer.</p>\n<p>I measure the duration just for the <strong>fit</strong> function, so the preparation of the data (creation of DataLoader and shuffling) is <strong>not</strong> tacking into account for the duration. But, maybe this overconsumption of time is due to extraction of data from the DataLoader in the</p>\n<blockquote>\n<p>for xb,yb in train_dl:</p>\n</blockquote>\n<p>loop?</p>\n<p>Another strange thing is that it takes more time to process when I use a GPU but maybe it is due to the time to transfer data to the GPU?</p>\n<p>For information, at first, I wanted to understand why a simple regression example took so long to run with Pytorch Lighting. So to compare with a simpler solution, I started by creating this tiny models with just Pytorch, but that led me to ask myself this question about the difference in performance between these two solutions.</p>\n<p>Philippe</p>",563          "post_number": 3,564          "post_type": 1,565          "posts_count": 6,566          "updated_at": "2022-10-06T06:37:46.699Z",567          "reply_count": 1,568          "reply_to_post_number": null,569          "quote_count": 0,570          "incoming_link_count": 0,571          "reads": 8,572          "readers_count": 7,573          "score": 6.6,574          "yours": false,575          "topic_id": 162878,576          "topic_slug": "strange-difference-in-performance-between-2-regression-programs",577          "display_username": "Philippe JUHEL",578          "primary_group_name": null,579          "flair_name": null,580          "flair_url": null,581          "flair_bg_color": null,582          "flair_color": null,583          "flair_group_id": null,584          "badges_granted": [],585          "version": 1,586          "can_edit": false,587          "can_delete": false,588          "can_recover": false,589          "can_see_hidden_post": false,590          "can_wiki": false,591          "read": true,592          "user_title": null,593          "bookmarked": false,594          "actions_summary": [],595          "moderator": false,596          "admin": false,597          "staff": false,598          "user_id": 59880,599          "hidden": false,600          "trust_level": 1,601          "deleted_at": null,602          "user_deleted": false,603          "edit_reason": null,604          "can_view_edit_history": true,605          "wiki": false,606          "post_url": "/t/strange-difference-in-performance-between-2-regression-programs/162878/3",607          "can_accept_answer": false,608          "can_unaccept_answer": false,609          "accepted_answer": false,610          "topic_accepted_answer": null611        },612        {613          "id": 369158,614          "name": "",615          "username": "ptrblck",616          "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",617          "created_at": "2022-10-06T06:53:02.190Z",618          "cooked": "<aside class=\"quote no-group\" data-username=\"Philippe_JUHEL\" data-post=\"3\" data-topic=\"162878\">\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/philippe_juhel/48/53773_2.png\" class=\"avatar\"> Philippe_JUHEL:</div>\n<blockquote>\n<p>I measure the duration just for the <strong>fit</strong> function, so the preparation of the data (creation of DataLoader and shuffling) is <strong>not</strong> tacking into account for the duration.</p>\n</blockquote>\n</aside>\n<p>That’s not true, since iterating the <code>DataLoader</code> will recreate it in each epoch to e.g. create a new sampler etc. If <code>num_workers&gt;0</code> is used than also the workers will be re-spawned unless <code>persistent_workers=True</code> is used. Again, you can profile your code to narrow down the slowdown.</p>\n<aside class=\"quote no-group\" data-username=\"Philippe_JUHEL\" data-post=\"3\" data-topic=\"162878\">\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/philippe_juhel/48/53773_2.png\" class=\"avatar\"> Philippe_JUHEL:</div>\n<blockquote>\n<p>Another strange thing is that it takes more time to process when I use a GPU but maybe it is due to the time to transfer data to the GPU?</p>\n</blockquote>\n</aside>\n<p>Your GPU profiling is invalid, since CUDA operations are executed asynchronously, so you would need to synchronize the code before starting and stopping the timers. However, even with proper profiling I would not expect to see any speedup, since your entire code is already bottlenecked by the data loading. A single tiny linear layer with <code>in_features=2</code> and <code>out_features=1</code> would also not benefit lrgely from a GPU execution.</p>",619          "post_number": 4,620          "post_type": 1,621          "posts_count": 6,622          "updated_at": "2022-10-06T06:53:02.190Z",623          "reply_count": 0,624          "reply_to_post_number": 3,625          "quote_count": 1,626          "incoming_link_count": 2,627          "reads": 8,628          "readers_count": 7,629          "score": 11.6,630          "yours": false,631          "topic_id": 162878,632          "topic_slug": "strange-difference-in-performance-between-2-regression-programs",633          "display_username": "",634          "primary_group_name": null,635          "flair_name": null,636          "flair_url": null,637          "flair_bg_color": null,638          "flair_color": null,639          "flair_group_id": null,640          "badges_granted": [],641          "version": 1,642          "can_edit": false,643          "can_delete": false,644          "can_recover": false,645          "can_see_hidden_post": false,646          "can_wiki": false,647          "read": true,648          "user_title": "",649          "bookmarked": false,650          "actions_summary": [],651          "moderator": true,652          "admin": true,653          "staff": true,654          "user_id": 3534,655          "hidden": false,656          "trust_level": 2,657          "deleted_at": null,658          "user_deleted": false,659          "edit_reason": null,660          "can_view_edit_history": true,661          "wiki": false,662          "post_url": "/t/strange-difference-in-performance-between-2-regression-programs/162878/4",663          "can_accept_answer": false,664          "can_unaccept_answer": false,665          "accepted_answer": false,666          "topic_accepted_answer": null667        },668        {669          "id": 369160,670          "name": "Philippe JUHEL",671          "username": "Philippe_JUHEL",672          "avatar_template": "/user_avatar/discuss.pytorch.org/philippe_juhel/{size}/53773_2.png",673          "created_at": "2022-10-06T07:02:32.483Z",674          "cooked": "<p>Thank you for all this information.</p>\n<p>I’ll continue my investigation with profiling and a bigger dataset.</p>\n<p>Philippe</p>",675          "post_number": 5,676          "post_type": 1,677          "posts_count": 6,678          "updated_at": "2022-10-06T07:02:32.483Z",679          "reply_count": 1,680          "reply_to_post_number": null,681          "quote_count": 0,682          "incoming_link_count": 0,683          "reads": 7,684          "readers_count": 6,685          "score": 51.4,686          "yours": false,687          "topic_id": 162878,688          "topic_slug": "strange-difference-in-performance-between-2-regression-programs",689          "display_username": "Philippe JUHEL",690          "primary_group_name": null,691          "flair_name": null,692          "flair_url": null,693          "flair_bg_color": null,694          "flair_color": null,695          "flair_group_id": null,696          "badges_granted": [],697          "version": 1,698          "can_edit": false,699          "can_delete": false,700          "can_recover": false,701          "can_see_hidden_post": false,702          "can_wiki": false,703          "read": true,704          "user_title": null,705          "bookmarked": false,706          "actions_summary": [707            {708              "id": 2,709              "count": 1710            }711          ],712          "moderator": false,713          "admin": false,714          "staff": false,715          "user_id": 59880,716          "hidden": false,717          "trust_level": 1,718          "deleted_at": null,719          "user_deleted": false,720          "edit_reason": null,721          "can_view_edit_history": true,722          "wiki": false,723          "post_url": "/t/strange-difference-in-performance-between-2-regression-programs/162878/5",724          "can_accept_answer": false,725          "can_unaccept_answer": false,726          "accepted_answer": false,727          "topic_accepted_answer": null728        },729        {730          "id": 369163,731          "name": "",732          "username": "ptrblck",733          "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",734          "created_at": "2022-10-06T07:14:19.360Z",735          "cooked": "<p>Sounds good!<br>\nAlso, try to increase the actual workload of the model and let me know how it goes.</p>",736          "post_number": 6,737          "post_type": 1,738          "posts_count": 6,739          "updated_at": "2022-10-06T07:14:19.360Z",740          "reply_count": 0,741          "reply_to_post_number": 5,742          "quote_count": 0,743          "incoming_link_count": 0,744          "reads": 6,745          "readers_count": 5,746          "score": 1.2,747          "yours": false,748          "topic_id": 162878,749          "topic_slug": "strange-difference-in-performance-between-2-regression-programs",750          "display_username": "",751          "primary_group_name": null,752          "flair_name": null,753          "flair_url": null,754          "flair_bg_color": null,755          "flair_color": null,756          "flair_group_id": null,757          "badges_granted": [],758          "version": 1,759          "can_edit": false,760          "can_delete": false,761          "can_recover": false,762          "can_see_hidden_post": false,763          "can_wiki": false,764          "read": true,765          "user_title": "",766          "reply_to_user": {767            "id": 59880,768            "username": "Philippe_JUHEL",769            "name": "Philippe JUHEL",770            "avatar_template": "/user_avatar/discuss.pytorch.org/philippe_juhel/{size}/53773_2.png"771          },772          "bookmarked": false,773          "actions_summary": [],774          "moderator": true,775          "admin": true,776          "staff": true,777          "user_id": 3534,778          "hidden": false,779          "trust_level": 2,780          "deleted_at": null,781          "user_deleted": false,782          "edit_reason": null,783          "can_view_edit_history": true,784          "wiki": false,785          "post_url": "/t/strange-difference-in-performance-between-2-regression-programs/162878/6",786          "can_accept_answer": false,787          "can_unaccept_answer": false,788          "accepted_answer": false,789          "topic_accepted_answer": null790        }791      ],792      "stream": [793        369085,794        369137,795        369155,796        369158,797        369160,798        369163799      ]800    },801    "timeline_lookup": [802      [803        1,804        1116805      ]806    ],807    "suggested_topics": [808      {809        "fancy_title": "TensorRT: Errors in PTQ Example",810        "id": 215386,811        "title": "TensorRT: Errors in PTQ Example",812        "slug": "tensorrt-errors-in-ptq-example",813        "posts_count": 4,814        "reply_count": 0,815        "highest_post_number": 4,816        "image_url": null,817        "created_at": "2025-01-14T17:41:05.390Z",818        "last_posted_at": "2025-01-21T11:58:15.063Z",819        "bumped": true,820        "bumped_at": "2025-01-21T11:58:15.063Z",821        "archetype": "regular",822        "unseen": false,823        "pinned": false,824        "unpinned": null,825        "visible": true,826        "closed": false,827        "archived": false,828        "bookmarked": null,829        "liked": null,830        "tags_descriptions": {},831        "like_count": 0,832        "views": 365,833        "category_id": 1,834        "featured_link": null,835        "has_accepted_answer": true,836        "posters": [837          {838            "extras": "latest",839            "description": "Original Poster, Most Recent Poster",840            "user": {841              "id": 82089,842              "username": "Tim_Langer",843              "name": "Tim Langer",844              "avatar_template": "/user_avatar/discuss.pytorch.org/tim_langer/{size}/75104_2.png",845              "trust_level": 1846            }847          },848          {849            "extras": null,850            "description": "Frequent Poster, Accepted Answer",851            "user": {852              "id": 50592,853              "username": "narendasan",854              "name": "Naren Dasan",855              "avatar_template": "/user_avatar/discuss.pytorch.org/narendasan/{size}/44133_2.png",856              "trust_level": 1857            }858          },859          {860            "extras": null,861            "description": "Frequent Poster",862            "user": {863              "id": 3534,864              "username": "ptrblck",865              "name": "",866              "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",867              "admin": true,868              "moderator": true,869              "trust_level": 2870            }871          }872        ]873      },874      {875        "fancy_title": "Why dose TorchDispatchMode miss aten::_index_put_impl_",876        "id": 215461,877        "title": "Why dose TorchDispatchMode miss aten::_index_put_impl_",878        "slug": "why-dose-torchdispatchmode-miss-aten-index-put-impl",879        "posts_count": 1,880        "reply_count": 0,881        "highest_post_number": 1,882        "image_url": "https://discuss.pytorch.org/uploads/default/optimized/3X/f/a/fa85623e202f4c6665e11f8cd7dc6fc19706c5dc_2_1024x292.png",883        "created_at": "2025-01-16T09:09:12.460Z",884        "last_posted_at": "2025-01-16T09:09:12.503Z",885        "bumped": true,886        "bumped_at": "2025-01-17T03:01:27.936Z",887        "archetype": "regular",888        "unseen": false,889        "pinned": false,890        "unpinned": null,891        "visible": true,892        "closed": false,893        "archived": false,894        "bookmarked": null,895        "liked": null,896        "tags_descriptions": {},897        "like_count": 0,898        "views": 122,899        "category_id": 1,900        "featured_link": null,901        "has_accepted_answer": false,902        "posters": [903          {904            "extras": "latest single",905            "description": "Original Poster, Most Recent Poster",906            "user": {907              "id": 82119,908              "username": "Cookie_Yang",909              "name": "Cookie Yang",910              "avatar_template": "/user_avatar/discuss.pytorch.org/cookie_yang/{size}/75125_2.png",911              "trust_level": 0912            }913          }914        ]915      },916      {917        "fancy_title": "Torch.linalg.lstsq: (Batch element 0): Argument 6 has illegal value",918        "id": 216565,919        "title": "Torch.linalg.lstsq: (Batch element 0): Argument 6 has illegal value",920        "slug": "torch-linalg-lstsq-batch-element-0-argument-6-has-illegal-value",921        "posts_count": 6,922        "reply_count": 4,923        "highest_post_number": 6,924        "image_url": null,925        "created_at": "2025-02-12T07:27:24.277Z",926        "last_posted_at": "2025-02-19T02:48:46.645Z",927        "bumped": true,928        "bumped_at": "2025-02-19T02:48:46.645Z",929        "archetype": "regular",930        "unseen": false,931        "pinned": false,932        "unpinned": null,933        "visible": true,934        "closed": false,935        "archived": false,936        "bookmarked": null,937        "liked": null,938        "tags_descriptions": {},939        "like_count": 0,940        "views": 118,941        "category_id": 1,942        "featured_link": null,943        "has_accepted_answer": false,944        "posters": [945          {946            "extras": null,947            "description": "Original Poster",948            "user": {949              "id": 82561,950              "username": "CarlosD1119",951              "name": "Deng Yibin",952              "avatar_template": "/user_avatar/discuss.pytorch.org/carlosd1119/{size}/75541_2.png",953              "trust_level": 0954            }955          },956          {957            "extras": "latest",958            "description": "Most Recent Poster",959            "user": {960              "id": 3534,961              "username": "ptrblck",962              "name": "",963              "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",964              "admin": true,965              "moderator": true,966              "trust_level": 2967            }968          }969        ]970      },971      {972        "fancy_title": "OOM problem when using Multiple GPU with CUDA_VISIBLE_DEVICES",973        "id": 219067,974        "title": "OOM problem when using Multiple GPU with CUDA_VISIBLE_DEVICES",975        "slug": "oom-problem-when-using-multiple-gpu-with-cuda-visible-devices",976        "posts_count": 4,977        "reply_count": 2,978        "highest_post_number": 4,979        "image_url": "https://discuss.pytorch.org/uploads/default/original/3X/7/3/7383ae8face215236b3014ef2e7d31913b58b66f.png",980        "created_at": "2025-04-14T14:57:13.935Z",981        "last_posted_at": "2025-04-15T07:55:30.060Z",982        "bumped": true,983        "bumped_at": "2025-04-15T07:55:30.060Z",984        "archetype": "regular",985        "unseen": false,986        "pinned": false,987        "unpinned": null,988        "visible": true,989        "closed": false,990        "archived": false,991        "bookmarked": null,992        "liked": null,993        "tags_descriptions": {},994        "like_count": 1,995        "views": 72,996        "category_id": 1,997        "featured_link": null,998        "has_accepted_answer": true,999        "posters": [1000          {1001            "extras": "latest",1002            "description": "Original Poster, Most Recent Poster",1003            "user": {1004              "id": 65586,1005              "username": "andy_sherlock",1006              "name": "andy sherlock",1007              "avatar_template": "/user_avatar/discuss.pytorch.org/andy_sherlock/{size}/59866_2.png",1008              "trust_level": 11009            }1010          },1011          {1012            "extras": null,1013            "description": "Frequent Poster, Accepted Answer",1014            "user": {1015              "id": 3534,1016              "username": "ptrblck",1017              "name": "",1018              "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",1019              "admin": true,1020              "moderator": true,1021              "trust_level": 21022            }1023          }1024        ]1025      },1026      {1027        "fancy_title": "[CPU] Train network using float 16?",1028        "id": 213486,1029        "title": "[CPU] Train network using float 16?",1030        "slug": "cpu-train-network-using-float-16",1031        "posts_count": 2,1032        "reply_count": 2,1033        "highest_post_number": 2,1034        "image_url": null,1035        "created_at": "2024-11-26T19:22:22.622Z",1036        "last_posted_at": "2024-11-26T21:13:26.532Z",1037        "bumped": true,1038        "bumped_at": "2024-11-27T03:07:04.265Z",1039        "archetype": "regular",1040        "unseen": false,1041        "pinned": false,1042        "unpinned": null,1043        "visible": true,1044        "closed": false,1045        "archived": false,1046        "bookmarked": null,1047        "liked": null,1048        "tags_descriptions": {},1049        "like_count": 1,1050        "views": 457,1051        "category_id": 1,1052        "featured_link": null,1053        "has_accepted_answer": true,1054        "posters": [1055          {1056            "extras": null,1057            "description": "Original Poster",1058            "user": {1059              "id": 81089,1060              "username": "Aknw_Fen",1061              "name": "Aknw Fen",1062              "avatar_template": "/user_avatar/discuss.pytorch.org/aknw_fen/{size}/74156_2.png",1063              "trust_level": 21064            }1065          },1066          {1067            "extras": "latest",1068            "description": "Most Recent Poster, Accepted Answer",1069            "user": {1070              "id": 3534,1071              "username": "ptrblck",1072              "name": "",1073              "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",1074              "admin": true,1075              "moderator": true,1076              "trust_level": 21077            }1078          }1079        ]1080      }1081    ],1082    "tags_descriptions": {},1083    "fancy_title": "Strange difference in performance between 2 regression programs",1084    "id": 162878,1085    "title": "Strange difference in performance between 2 regression programs",1086    "posts_count": 6,1087    "created_at": "2022-10-05T19:48:59.169Z",1088    "views": 451,1089    "reply_count": 2,1090    "like_count": 1,1091    "last_posted_at": "2022-10-06T07:14:19.360Z",1092    "visible": true,1093    "closed": false,1094    "archived": false,1095    "has_summary": false,1096    "archetype": "regular",1097    "slug": "strange-difference-in-performance-between-2-regression-programs",1098    "category_id": 1,1099    "word_count": 995,1100    "deleted_at": null,1101    "user_id": 59880,1102    "featured_link": null,1103    "pinned_globally": false,1104    "pinned_at": null,1105    "pinned_until": null,1106    "image_url": null,1107    "slow_mode_seconds": 0,1108    "draft": null,1109    "draft_key": "topic_162878",1110    "draft_sequence": null,1111    "unpinned": null,1112    "pinned": false,1113    "current_post_number": 1,1114    "highest_post_number": 6,1115    "deleted_by": null,1116    "actions_summary": [1117      {1118        "id": 4,1119        "count": 0,1120        "hidden": false,1121        "can_act": false1122      },1123      {1124        "id": 8,1125        "count": 0,1126        "hidden": false,1127        "can_act": false1128      },1129      {1130        "id": 10,1131        "count": 0,1132        "hidden": false,1133        "can_act": false1134      },1135      {1136        "id": 7,1137        "count": 0,1138        "hidden": false,1139        "can_act": false1140      }1141    ],1142    "chunk_size": 20,1143    "bookmarked": false,1144    "topic_timer": null,1145    "message_bus_last_id": 0,1146    "participant_count": 2,1147    "show_read_indicator": false,1148    "thumbnails": null,1149    "slow_mode_enabled_until": null,1150    "can_vote": false,1151    "vote_count": 0,1152    "user_voted": false,1153    "discourse_zendesk_plugin_zendesk_id": null,1154    "discourse_zendesk_plugin_zendesk_url": "https://your-url.zendesk.com/agent/tickets/",1155    "details": {1156      "can_edit": false,1157      "notification_level": 1,1158      "participants": [1159        {1160          "id": 3534,1161          "username": "ptrblck",1162          "name": "",1163          "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",1164          "post_count": 3,1165          "primary_group_name": null,1166          "flair_name": null,1167          "flair_url": null,1168          "flair_color": null,1169          "flair_bg_color": null,1170          "flair_group_id": null,1171          "admin": true,1172          "moderator": true,1173          "trust_level": 21174        },1175        {1176          "id": 59880,1177          "username": "Philippe_JUHEL",1178          "name": "Philippe JUHEL",1179          "avatar_template": "/user_avatar/discuss.pytorch.org/philippe_juhel/{size}/53773_2.png",1180          "post_count": 3,1181          "primary_group_name": null,1182          "flair_name": null,1183          "flair_url": null,1184          "flair_color": null,1185          "flair_bg_color": null,1186          "flair_group_id": null,1187          "trust_level": 11188        }1189      ],1190      "created_by": {1191        "id": 59880,1192        "username": "Philippe_JUHEL",1193        "name": "Philippe JUHEL",1194        "avatar_template": "/user_avatar/discuss.pytorch.org/philippe_juhel/{size}/53773_2.png"1195      },1196      "last_poster": {1197        "id": 3534,1198        "username": "ptrblck",1199        "name": "",1200        "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png"

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