CoolFace
Datasetpublic

Anurag1734/cuda-error-resolution-analysis

sourceHugging Faceupdated 2mo agoView on Hugging Face
0likes7downloads
topics_batch_373.json66401 linesDownload Raw Back to raw
1[2  {3    "post_stream": {4      "posts": [5        {6          "id": 266917,7          "name": "mmg",8          "username": "mmg",9          "avatar_template": "/letter_avatar_proxy/v4/letter/m/5fc32e/{size}.png",10          "created_at": "2021-03-01T12:58:08.464Z",11          "cooked": "<p>Hi,</p>\n<p>I am trying to find out the number of parameters for a PyTorch model</p>\n<pre><code class=\"lang-auto\">class SimpleRNN(nn.Module):\n    def __init__(self):\n        super(SimpleRNN, self).__init__()\n        self.rnn = nn.RNN(input_size=1,\n                         hidden_size=20,\n                         num_layers=1,\n                         nonlinearity='tanh',\n                         batch_first=True\n                         )\n        self.fc = nn.Linear(20, 1)\n    def forward(self,X):\n        out, _ = self.rnn(X)\n        out = self.fc(out[:,-1, :])\n        return out\n        \nmodel_sr = SimpleRNN()\n\nfrom torchsummary import summary\nsummary(model_sr, (50,1))\n</code></pre>\n<p>But it says 0 params for the RNN layer! Is there a way for me to find out? (e.g. in Keras’ model.summary(), it does give a number)</p>\n<p>Thanks</p>",12          "post_number": 1,13          "post_type": 1,14          "posts_count": 2,15          "updated_at": "2021-03-01T12:58:08.464Z",16          "reply_count": 0,17          "reply_to_post_number": null,18          "quote_count": 0,19          "incoming_link_count": 120,20          "reads": 8,21          "readers_count": 7,22          "score": 591.6,23          "yours": false,24          "topic_id": 113360,25          "topic_slug": "rnn-number-of-parameters",26          "display_username": "mmg",27          "primary_group_name": null,28          "flair_name": null,29          "flair_url": null,30          "flair_bg_color": null,31          "flair_color": null,32          "flair_group_id": null,33          "badges_granted": [],34          "version": 1,35          "can_edit": false,36          "can_delete": false,37          "can_recover": false,38          "can_see_hidden_post": false,39          "can_wiki": false,40          "read": true,41          "user_title": null,42          "bookmarked": false,43          "actions_summary": [],44          "moderator": false,45          "admin": false,46          "staff": false,47          "user_id": 42237,48          "hidden": false,49          "trust_level": 2,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/rnn-number-of-parameters/113360/1",56          "can_accept_answer": false,57          "can_unaccept_answer": false,58          "accepted_answer": false,59          "topic_accepted_answer": true,60          "can_vote": false61        },62        {63          "id": 266929,64          "name": "Shivam Mehta",65          "username": "shivammehta007",66          "avatar_template": "/user_avatar/discuss.pytorch.org/shivammehta007/{size}/31230_2.png",67          "created_at": "2021-03-01T13:45:38.269Z",68          "cooked": "<pre><code class=\"lang-auto\">def count_parameters(model):\n    return sum(param.numel() for param in model.parameters())\n</code></pre>\n<p>This function will help you to count the number of parameters in your model</p>",69          "post_number": 2,70          "post_type": 1,71          "posts_count": 2,72          "updated_at": "2021-03-01T13:59:36.165Z",73          "reply_count": 0,74          "reply_to_post_number": null,75          "quote_count": 0,76          "incoming_link_count": 2,77          "reads": 8,78          "readers_count": 7,79          "score": 26.6,80          "yours": false,81          "topic_id": 113360,82          "topic_slug": "rnn-number-of-parameters",83          "display_username": "Shivam Mehta",84          "primary_group_name": null,85          "flair_name": null,86          "flair_url": null,87          "flair_bg_color": null,88          "flair_color": null,89          "flair_group_id": null,90          "badges_granted": [],91          "version": 1,92          "can_edit": false,93          "can_delete": false,94          "can_recover": false,95          "can_see_hidden_post": false,96          "can_wiki": false,97          "read": true,98          "user_title": null,99          "bookmarked": false,100          "actions_summary": [101            {102              "id": 2,103              "count": 1104            }105          ],106          "moderator": false,107          "admin": false,108          "staff": false,109          "user_id": 30366,110          "hidden": false,111          "trust_level": 2,112          "deleted_at": null,113          "user_deleted": false,114          "edit_reason": null,115          "can_view_edit_history": true,116          "wiki": false,117          "post_url": "/t/rnn-number-of-parameters/113360/2",118          "can_accept_answer": false,119          "can_unaccept_answer": false,120          "accepted_answer": true,121          "topic_accepted_answer": true122        }123      ],124      "stream": [125        266917,126        266929127      ]128    },129    "timeline_lookup": [130      [131        1,132        1699133      ]134    ],135    "suggested_topics": [136      {137        "fancy_title": "Negative &ldquo;warps per SM&rdquo;",138        "id": 219198,139        "title": "Negative \"warps per SM\"",140        "slug": "negative-warps-per-sm",141        "posts_count": 1,142        "reply_count": 0,143        "highest_post_number": 1,144        "image_url": null,145        "created_at": "2025-04-17T10:27:49.497Z",146        "last_posted_at": "2025-04-17T10:27:49.541Z",147        "bumped": true,148        "bumped_at": "2025-04-17T17:15:15.043Z",149        "archetype": "regular",150        "unseen": false,151        "pinned": false,152        "unpinned": null,153        "visible": true,154        "closed": false,155        "archived": false,156        "bookmarked": null,157        "liked": null,158        "tags_descriptions": {},159        "like_count": 0,160        "views": 37,161        "category_id": 1,162        "featured_link": null,163        "has_accepted_answer": false,164        "posters": [165          {166            "extras": "latest single",167            "description": "Original Poster, Most Recent Poster",168            "user": {169              "id": 83873,170              "username": "JB13",171              "name": null,172              "avatar_template": "/letter_avatar_proxy/v4/letter/j/71c47a/{size}.png",173              "trust_level": 0174            }175          }176        ]177      },178      {179        "fancy_title": "Inference_mode() doesn&rsquo;t remove grad",180        "id": 216739,181        "title": "Inference_mode() doesn't remove grad",182        "slug": "inference-mode-doesnt-remove-grad",183        "posts_count": 2,184        "reply_count": 0,185        "highest_post_number": 2,186        "image_url": "https://discuss.pytorch.org/uploads/default/original/3X/1/d/1d5da9ab3a51d653e4e1cc79efce5660959de40d.png",187        "created_at": "2025-02-16T12:10:09.684Z",188        "last_posted_at": "2025-02-16T15:15:50.947Z",189        "bumped": true,190        "bumped_at": "2025-02-16T15:15:50.947Z",191        "archetype": "regular",192        "unseen": false,193        "pinned": false,194        "unpinned": null,195        "visible": true,196        "closed": false,197        "archived": false,198        "bookmarked": null,199        "liked": null,200        "tags_descriptions": {},201        "like_count": 0,202        "views": 76,203        "category_id": 1,204        "featured_link": null,205        "has_accepted_answer": false,206        "posters": [207          {208            "extras": null,209            "description": "Original Poster",210            "user": {211              "id": 82719,212              "username": "blmppes",213              "name": "Trung Hiếu Đỗ",214              "avatar_template": "/user_avatar/discuss.pytorch.org/blmppes/{size}/75683_2.png",215              "trust_level": 0216            }217          },218          {219            "extras": "latest",220            "description": "Most Recent Poster",221            "user": {222              "id": 3534,223              "username": "ptrblck",224              "name": "",225              "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",226              "admin": true,227              "moderator": true,228              "trust_level": 2229            }230          }231        ]232      },233      {234        "fancy_title": "The nightly binary with CUDA 12.8",235        "id": 218165,236        "title": "The nightly binary with CUDA 12.8",237        "slug": "the-nightly-binary-with-cuda-12-8",238        "posts_count": 4,239        "reply_count": 1,240        "highest_post_number": 4,241        "image_url": null,242        "created_at": "2025-03-23T12:05:42.272Z",243        "last_posted_at": "2025-05-19T03:12:35.824Z",244        "bumped": true,245        "bumped_at": "2025-05-19T03:12:35.824Z",246        "archetype": "regular",247        "unseen": false,248        "pinned": false,249        "unpinned": null,250        "visible": true,251        "closed": false,252        "archived": false,253        "bookmarked": null,254        "liked": null,255        "tags_descriptions": {},256        "like_count": 1,257        "views": 1050,258        "category_id": 1,259        "featured_link": null,260        "has_accepted_answer": false,261        "posters": [262          {263            "extras": null,264            "description": "Original Poster",265            "user": {266              "id": 83426,267              "username": "white711203",268              "name": "White711203",269              "avatar_template": "/user_avatar/discuss.pytorch.org/white711203/{size}/76301_2.png",270              "trust_level": 1271            }272          },273          {274            "extras": null,275            "description": "Frequent Poster",276            "user": {277              "id": 84341,278              "username": "ahanjaya",279              "name": "哲菡 許",280              "avatar_template": "/user_avatar/discuss.pytorch.org/ahanjaya/{size}/77056_2.png",281              "trust_level": 0282            }283          },284          {285            "extras": "latest",286            "description": "Most Recent Poster",287            "user": {288              "id": 3534,289              "username": "ptrblck",290              "name": "",291              "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",292              "admin": true,293              "moderator": true,294              "trust_level": 2295            }296          }297        ]298      },299      {300        "fancy_title": "Image segmentation advice",301        "id": 218616,302        "title": "Image segmentation advice",303        "slug": "image-segmentation-advice",304        "posts_count": 5,305        "reply_count": 2,306        "highest_post_number": 5,307        "image_url": null,308        "created_at": "2025-04-04T12:39:32.549Z",309        "last_posted_at": "2025-04-07T13:37:29.859Z",310        "bumped": true,311        "bumped_at": "2025-04-07T13:37:29.859Z",312        "archetype": "regular",313        "unseen": false,314        "pinned": false,315        "unpinned": null,316        "visible": true,317        "closed": false,318        "archived": false,319        "bookmarked": null,320        "liked": null,321        "tags_descriptions": {},322        "like_count": 0,323        "views": 109,324        "category_id": 1,325        "featured_link": null,326        "has_accepted_answer": false,327        "posters": [328          {329            "extras": null,330            "description": "Original Poster",331            "user": {332              "id": 83634,333              "username": "Rick1989",334              "name": "Rick",335              "avatar_template": "/user_avatar/discuss.pytorch.org/rick1989/{size}/76489_2.png",336              "trust_level": 0337            }338          },339          {340            "extras": null,341            "description": "Frequent Poster",342            "user": {343              "id": 46784,344              "username": "Ayush_Saini",345              "name": "Ayush Saini",346              "avatar_template": "/user_avatar/discuss.pytorch.org/ayush_saini/{size}/39854_2.png",347              "trust_level": 1348            }349          },350          {351            "extras": "latest",352            "description": "Most Recent Poster",353            "user": {354              "id": 18088,355              "username": "KFrank",356              "name": "K. Frank",357              "avatar_template": "/letter_avatar_proxy/v4/letter/k/ecb155/{size}.png",358              "trust_level": 2359            }360          }361        ]362      },363      {364        "fancy_title": "Any suggestion about long time serie prediction as this kind?",365        "id": 219831,366        "title": "Any suggestion about long time serie prediction as this kind?",367        "slug": "any-suggestion-about-long-time-serie-prediction-as-this-kind",368        "posts_count": 1,369        "reply_count": 0,370        "highest_post_number": 1,371        "image_url": "https://discuss.pytorch.org/uploads/default/optimized/3X/1/a/1a304af49cd44f086ffdc0202ca4fbde587747e8_2_1024x559.png",372        "created_at": "2025-05-07T09:34:13.777Z",373        "last_posted_at": "2025-05-07T09:34:13.826Z",374        "bumped": true,375        "bumped_at": "2025-05-07T09:34:13.826Z",376        "archetype": "regular",377        "unseen": false,378        "pinned": false,379        "unpinned": null,380        "visible": true,381        "closed": false,382        "archived": false,383        "bookmarked": null,384        "liked": null,385        "tags_descriptions": {},386        "like_count": 0,387        "views": 56,388        "category_id": 1,389        "featured_link": null,390        "has_accepted_answer": false,391        "posters": [392          {393            "extras": "latest single",394            "description": "Original Poster, Most Recent Poster",395            "user": {396              "id": 84183,397              "username": "WEIKE_LIAO",398              "name": "WEIKE LIAO",399              "avatar_template": "/user_avatar/discuss.pytorch.org/weike_liao/{size}/76938_2.png",400              "trust_level": 0401            }402          }403        ]404      }405    ],406    "tags_descriptions": {},407    "fancy_title": "RNN - Number of Parameters",408    "id": 113360,409    "title": "RNN - Number of Parameters",410    "posts_count": 2,411    "created_at": "2021-03-01T12:58:08.404Z",412    "views": 550,413    "reply_count": 1,414    "like_count": 1,415    "last_posted_at": "2021-03-01T13:45:38.269Z",416    "visible": true,417    "closed": false,418    "archived": false,419    "has_summary": false,420    "archetype": "regular",421    "slug": "rnn-number-of-parameters",422    "category_id": 1,423    "word_count": 141,424    "deleted_at": null,425    "user_id": 42237,426    "featured_link": null,427    "pinned_globally": false,428    "pinned_at": null,429    "pinned_until": null,430    "image_url": null,431    "slow_mode_seconds": 0,432    "draft": null,433    "draft_key": "topic_113360",434    "draft_sequence": null,435    "unpinned": null,436    "pinned": false,437    "current_post_number": 1,438    "highest_post_number": 2,439    "deleted_by": null,440    "actions_summary": [441      {442        "id": 4,443        "count": 0,444        "hidden": false,445        "can_act": false446      },447      {448        "id": 8,449        "count": 0,450        "hidden": false,451        "can_act": false452      },453      {454        "id": 10,455        "count": 0,456        "hidden": false,457        "can_act": false458      },459      {460        "id": 7,461        "count": 0,462        "hidden": false,463        "can_act": false464      }465    ],466    "chunk_size": 20,467    "bookmarked": false,468    "topic_timer": null,469    "message_bus_last_id": 0,470    "participant_count": 2,471    "show_read_indicator": false,472    "thumbnails": null,473    "slow_mode_enabled_until": null,474    "accepted_answer": {475      "post_number": 2,476      "username": "shivammehta007",477      "name": "Shivam Mehta",478      "excerpt": "def count_parameters(model):\n    return sum(param.numel() for param in model.parameters())\n\nThis function will help you to count the number of parameters in your model"479    },480    "can_vote": false,481    "vote_count": 0,482    "user_voted": false,483    "discourse_zendesk_plugin_zendesk_id": null,484    "discourse_zendesk_plugin_zendesk_url": "https://your-url.zendesk.com/agent/tickets/",485    "details": {486      "can_edit": false,487      "notification_level": 1,488      "participants": [489        {490          "id": 30366,491          "username": "shivammehta007",492          "name": "Shivam Mehta",493          "avatar_template": "/user_avatar/discuss.pytorch.org/shivammehta007/{size}/31230_2.png",494          "post_count": 1,495          "primary_group_name": null,496          "flair_name": null,497          "flair_url": null,498          "flair_color": null,499          "flair_bg_color": null,500          "flair_group_id": null,501          "trust_level": 2502        },503        {504          "id": 42237,505          "username": "mmg",506          "name": "mmg",507          "avatar_template": "/letter_avatar_proxy/v4/letter/m/5fc32e/{size}.png",508          "post_count": 1,509          "primary_group_name": null,510          "flair_name": null,511          "flair_url": null,512          "flair_color": null,513          "flair_bg_color": null,514          "flair_group_id": null,515          "trust_level": 2516        }517      ],518      "created_by": {519        "id": 42237,520        "username": "mmg",521        "name": "mmg",522        "avatar_template": "/letter_avatar_proxy/v4/letter/m/5fc32e/{size}.png"523      },524      "last_poster": {525        "id": 30366,526        "username": "shivammehta007",527        "name": "Shivam Mehta",528        "avatar_template": "/user_avatar/discuss.pytorch.org/shivammehta007/{size}/31230_2.png"529      }530    },531    "bookmarks": []532  },533  {534    "post_stream": {535      "posts": [536        {537          "id": 247422,538          "name": "Ryunosuke0723",539          "username": "ryunosuke0723",540          "avatar_template": "/letter_avatar_proxy/v4/letter/r/b77776/{size}.png",541          "created_at": "2020-11-27T07:10:01.349Z",542          "cooked": "<p>I got an error with the title, do I need to declare it using class?</p>\n<pre><code class=\"lang-auto\">import torch\nimport numpy as np\nfrom bindsnet.network import Network\nfrom bindsnet.network.nodes import Input, LIFNodes\nfrom bindsnet.network.topology import Connection\nfrom bindsnet.network.monitors import Monitor\n\n\ntime = 25\n# bulding network\nnetwork = Network()\n\n# 5layers of neuron \ninpt = Input(n=64, sum_input=True) \nmiddle = LIFNodes(n=40, trace=True, sum_input=True)\ncenter = LIFNodes(n=40, trace=True, sum_input=True)\nfinal = LIFNodes(n=40, trace=True, sum_input=True)\nout = LIFNodes(n=6, sum_input=True) # n=6はラベルと同じ数にする\n\n# connecting of each layers\ninpt_middle = Connection(source=inpt, target=middle, wmin=0, wmax=1e-1)\nmiddle_center = Connection(source=middle, target=center, wmin=0, wmax=1e-1)\ncenter_final = Connection(source=center, target=final, wmin=0, wmax=1e-1)\nfinal_out = Connection(source=final, target=out, wmin=0, wmax=1e-1)\n\n# connecting all layers to network\nnetwork.add_layer(inpt, name='A')\nnetwork.add_layer(middle, name='B')\nnetwork.add_layer(center, name='C')\nnetwork.add_layer(final,  name='D')\nnetwork.add_layer(out, name='E')\n\nfoward_connection = Connection(source=inpt, target=middle, w=0.05 + 0.1*torch.randn(inpt.n, middle.n))\nnetwork.add_connection(connection=foward_connection, source=\"A\", target=\"B\")\nfoward_connection = Connection(source=middle, target=center, w=0.05 + 0.1*torch.randn(middle.n, center.n))\nnetwork.add_connection(connection=foward_connection, source=\"B\", target=\"C\")\nfoward_connection = Connection(source=center, target=final, w=0.05 + 0.1*torch.randn(center.n, final.n))\nnetwork.add_connection(connection=foward_connection, source=\"C\", target=\"D\")\nfoward_connection = Connection(source=final, target=out, w=0.05 + 0.1*torch.randn(final.n, out.n))\nnetwork.add_connection(connection=foward_connection, source=\"D\", target=\"E\")\nrecurrent_connection = Connection(source=out, target=out, w=0.025*(torch.eye(out.n)-1),)\nnetwork.add_connection(connection=recurrent_connection, source=\"E\", target=\"E\")\n\n# monitoring input's spikes and output's one\ninpt_monitor = Monitor(obj=inpt, state_vars=(\"s\", \"v\"), time=500,)\nmiddle_monitor = Monitor(obj=inpt, state_vars=(\"s\", \"v\"), time=500,)\ncenter_monitor = Monitor(obj=inpt, state_vars=(\"s\", \"v\"), time=500,)\nfinal_monitor = Monitor(obj=inpt, state_vars=(\"s\", \"v\"), time=500,)\nout_monitor = Monitor(obj=inpt, state_vars=(\"s\", \"v\"), time=500,)\n\n# connecting monitor to network\nnetwork.add_monitor(monitor=inpt_monitor, name=\"A\")\nnetwork.add_monitor(monitor=middle_monitor, name=\"B\")\nnetwork.add_monitor(monitor=center_monitor, name=\"C\")\nnetwork.add_monitor(monitor=final_monitor, name=\"D\")\nnetwork.add_monitor(monitor=out_monitor, name=\"E\")\n\nfor l in network.layers:\n    m = Monitor(network.layers[l], state_vars=['s'], time=time)\n    network.add_monitor(m, name=l)\n\n# date loading \nnpzfile = np.load(\"C:/Users/name/Desktop/myo-python-1.0.4/myo-armband-nn-master/data/train_set.npz\")\nx = npzfile['x']  # ndarray [1,64]\ny = npzfile['y']  # ndarry  [1,6]\n\n# transforming numpy to tensor\nx = torch.from_numpy(x).clone()\ny = torch.from_numpy(y).clone()\n\ngrads = {}\nlr, lr_decay = 1e-2, 0.95\ncriterion = torch.nn.CrossEntropyLoss()  \nspike_ims, spike_axes, weight_im = None, None, None\nfor i, (x, y) in enumerate(zip(x.view(-1, 64), y)):\n    inputs = {'A': x.repeat(time, 1), 'E_b': torch.ones(time, 1)}\n    network.run(inputs=inputs, time=time)\n    y = torch.tensor(y).long()\n    spikes = {l: network.monitors[l].get('s') for l in network.layers}\n    summed_inputs = {l: network.layers[l].summed for l in network.layers}\n    output = spikes['E'].sum(-1).float().softmax(0).view(1, -1)\n    predicted = output.argmax(1).item()\n    y = torch.argmax(y, dim=-1) \n\n    grads['dl/df'] = summed_inputs['B'].softmax(0)\n    grads['dl/df'][y] -= 1\n    summed_inputs['A'] = torch.squeeze(summed_inputs['A'], dim=0)\n    grads['dl/df'] = torch.squeeze(grads['dl/df'], dim=0)\n    grads['dl/dw'] = torch.ger(summed_inputs['A'], grads['dl/df'])\n    network.connections['A', 'B'].w -= lr * grads['dl/dw']\n\n    grads['dl/df'] = summed_inputs['C'].softmax(0)\n    grads['dl/df'][y] -= 1\n    summed_inputs['B'] = torch.squeeze(summed_inputs['B'], dim=0)\n    grads['dl/df'] = torch.squeeze(grads['dl/df'], dim=0)\n    grads['dl/dw'] = torch.ger(summed_inputs['B'], grads['dl/df'])\n    network.connections['B', 'C'].w -= lr * grads['dl/dw']\n\n    grads['dl/df'] = summed_inputs['D'].softmax(0)\n    grads['dl/df'][y] -= 1\n    summed_inputs['C'] = torch.squeeze(summed_inputs['C'], dim=0)\n    grads['dl/df'] = torch.squeeze(grads['dl/df'], dim=0)\n    grads['dl/dw'] = torch.ger(summed_inputs['C'], grads['dl/df'])\n    network.connections['C', 'D'].w -= lr * grads['dl/dw']\n\n    grads['dl/df'] = summed_inputs['E'].softmax(0)\n    grads['dl/df'][y] -= 1\n    summed_inputs['D'] = torch.squeeze(summed_inputs['D'], dim=0)\n    grads['dl/df'] = torch.squeeze(grads['dl/df'], dim=0)\n    grads['dl/dw'] = torch.ger(summed_inputs['D'], grads['dl/df'])\n    network.connections['D', 'E'].w -= lr*grads['dl/dw']\n\n    if i &gt; 0 and i % 300 == 0:\n       lr = lr_decay\n    network.reset_()\n\n</code></pre>\n<p>error message</p>\n<pre><code class=\"lang-auto\">Traceback (most recent call last):\n  File \"C:/Users/name/Desktop/myo-python-1.0.4/bindsnet-master/bindsnet/preRSNN.py\", line 126, in &lt;module&gt;\n    network.reset_()\n  File \"C:\\Python36\\lib\\site-packages\\torch\\nn\\modules\\module.py\", line 772, in __getattr__\n    type(self).__name__, name))\ntorch.nn.modules.module.ModuleAttributeError: 'Network' object has no attribute 'reset_'\n</code></pre>",543          "post_number": 1,544          "post_type": 1,545          "posts_count": 9,546          "updated_at": "2020-11-27T07:10:01.349Z",547          "reply_count": 0,548          "reply_to_post_number": null,549          "quote_count": 0,550          "incoming_link_count": 852,551          "reads": 42,552          "readers_count": 41,553          "score": 4268.4,554          "yours": false,555          "topic_id": 104296,556          "topic_slug": "torch-nn-modules-module-moduleattributeerror-network-object-has-no-attribute-reset",557          "display_username": "Ryunosuke0723",558          "primary_group_name": null,559          "flair_name": null,560          "flair_url": null,561          "flair_bg_color": null,562          "flair_color": null,563          "flair_group_id": null,564          "badges_granted": [],565          "version": 1,566          "can_edit": false,567          "can_delete": false,568          "can_recover": false,569          "can_see_hidden_post": false,570          "can_wiki": false,571          "read": true,572          "user_title": null,573          "bookmarked": false,574          "actions_summary": [],575          "moderator": false,576          "admin": false,577          "staff": false,578          "user_id": 38958,579          "hidden": false,580          "trust_level": 1,581          "deleted_at": null,582          "user_deleted": false,583          "edit_reason": null,584          "can_view_edit_history": true,585          "wiki": false,586          "post_url": "/t/torch-nn-modules-module-moduleattributeerror-network-object-has-no-attribute-reset/104296/1",587          "can_accept_answer": false,588          "can_unaccept_answer": false,589          "accepted_answer": false,590          "topic_accepted_answer": null,591          "can_vote": false592        },593        {594          "id": 247424,595          "name": "",596          "username": "ptrblck",597          "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",598          "created_at": "2020-11-27T07:13:42.767Z",599          "cooked": "<p>It seems that the <code>bindsnet</code> library expects the <code>network</code> object to provide a <code>reset_</code> function, which is not a default method of <code>nn.Modules</code>.<br>\nI would recommend to check with the authors of <code>bindsnet</code> and their docs how <code>nn.Modules</code> should be used.</p>",600          "post_number": 2,601          "post_type": 1,602          "posts_count": 9,603          "updated_at": "2020-11-27T07:13:42.767Z",604          "reply_count": 0,605          "reply_to_post_number": null,606          "quote_count": 0,607          "incoming_link_count": 6,608          "reads": 40,609          "readers_count": 39,610          "score": 38.0,611          "yours": false,612          "topic_id": 104296,613          "topic_slug": "torch-nn-modules-module-moduleattributeerror-network-object-has-no-attribute-reset",614          "display_username": "",615          "primary_group_name": null,616          "flair_name": null,617          "flair_url": null,618          "flair_bg_color": null,619          "flair_color": null,620          "flair_group_id": null,621          "badges_granted": [],622          "version": 1,623          "can_edit": false,624          "can_delete": false,625          "can_recover": false,626          "can_see_hidden_post": false,627          "can_wiki": false,628          "read": true,629          "user_title": "",630          "bookmarked": false,631          "actions_summary": [],632          "moderator": true,633          "admin": true,634          "staff": true,635          "user_id": 3534,636          "hidden": false,637          "trust_level": 2,638          "deleted_at": null,639          "user_deleted": false,640          "edit_reason": null,641          "can_view_edit_history": true,642          "wiki": false,643          "post_url": "/t/torch-nn-modules-module-moduleattributeerror-network-object-has-no-attribute-reset/104296/2",644          "can_accept_answer": false,645          "can_unaccept_answer": false,646          "accepted_answer": false,647          "topic_accepted_answer": null648        },649        {650          "id": 247464,651          "name": "Ryunosuke0723",652          "username": "ryunosuke0723",653          "avatar_template": "/letter_avatar_proxy/v4/letter/r/b77776/{size}.png",654          "created_at": "2020-11-27T09:25:08.198Z",655          "cooked": "<p>I focused on [ from bindsnet.network import Network] especially Class Network.<br>\nShould we focus on the [def train] section?</p>\n<pre><code class=\"lang-auto\">\nfrom .monitors import AbstractMonitor\nfrom .nodes import Nodes\nfrom .topology import AbstractConnection\nfrom ..learning.reward import AbstractReward\n\n\ndef load(file_name: str, map_location: str = \"cpu\", learning: bool = None) -&gt; \"Network\":\n    # language=rst\n    \"\"\"\n    Loads serialized network object from disk.\n\n    :param file_name: Path to serialized network object on disk.\n    :param map_location: One of ``\"cpu\"`` or ``\"cuda\"``. Defaults to ``\"cpu\"``.\n    :param learning: Whether to load with learning enabled. Default loads value from\n        disk.\n    \"\"\"\n    network = torch.load(open(file_name, \"rb\"), map_location=map_location)\n    if learning is not None and \"learning\" in vars(network):\n        network.learning = learning\n\n    return network\n\n\nclass Network(torch.nn.Module):\n    # language=rst\n    \"\"\"\n    Central object of the ``bindsnet`` package. Responsible for the simulation and\n    interaction of nodes and connections.\n\n    **Example:**\n\n    .. code-block:: python\n\n        import torch\n        import matplotlib.pyplot as plt\n\n        from bindsnet         import encoding\n        from bindsnet.network import Network, nodes, topology, monitors\n\n        network = Network(dt=1.0)  # Instantiates network.\n\n        X = nodes.Input(100)  # Input layer.\n        Y = nodes.LIFNodes(100)  # Layer of LIF neurons.\n        C = topology.Connection(source=X, target=Y, w=torch.rand(X.n, Y.n))  # Connection from X to Y.\n\n        # Spike monitor objects.\n        M1 = monitors.Monitor(obj=X, state_vars=['s'])\n        M2 = monitors.Monitor(obj=Y, state_vars=['s'])\n\n        # Add everything to the network object.\n        network.add_layer(layer=X, name='X')\n        network.add_layer(layer=Y, name='Y')\n        network.add_connection(connection=C, source='X', target='Y')\n        network.add_monitor(monitor=M1, name='X')\n        network.add_monitor(monitor=M2, name='Y')\n\n        # Create Poisson-distributed spike train inputs.\n        data = 15 * torch.rand(100)  # Generate random Poisson rates for 100 input neurons.\n        train = encoding.poisson(datum=data, time=5000)  # Encode input as 5000ms Poisson spike trains.\n\n        # Simulate network on generated spike trains.\n        inputs = {'X' : train}  # Create inputs mapping.\n        network.run(inputs=inputs, time=5000)  # Run network simulation.\n\n        # Plot spikes of input and output layers.\n        spikes = {'X' : M1.get('s'), 'Y' : M2.get('s')}\n\n        fig, axes = plt.subplots(2, 1, figsize=(12, 7))\n        for i, layer in enumerate(spikes):\n            axes[i].matshow(spikes[layer], cmap='binary')\n            axes[i].set_title('%s spikes' % layer)\n            axes[i].set_xlabel('Time'); axes[i].set_ylabel('Index of neuron')\n            axes[i].set_xticks(()); axes[i].set_yticks(())\n            axes[i].set_aspect('auto')\n\n        plt.tight_layout(); plt.show()\n    \"\"\"\n\n    def __init__(\n        self,\n        dt: float = 1.0,\n        batch_size: int = 1,\n        learning: bool = True,\n        reward_fn: Optional[Type[AbstractReward]] = None,\n    ) -&gt; None:\n        # language=rst\n        \"\"\"\n        Initializes network object.\n\n        :param dt: Simulation timestep.\n        :param batch_size: Mini-batch size.\n        :param learning: Whether to allow connection updates. True by default.\n        :param reward_fn: Optional class allowing for modification of reward in case of\n            reward-modulated learning.\n        \"\"\"\n        super().__init__()\n\n        self.dt = dt\n        self.batch_size = batch_size\n\n        self.layers = {}\n        self.connections = {}\n        self.monitors = {}\n\n        self.train(learning)\n\n        if reward_fn is not None:\n            self.reward_fn = reward_fn()\n        else:\n            self.reward_fn = None\n\n    def add_layer(self, layer: Nodes, name: str) -&gt; None:\n        # language=rst\n        \"\"\"\n        Adds a layer of nodes to the network.\n\n        :param layer: A subclass of the ``Nodes`` object.\n        :param name: Logical name of layer.\n        \"\"\"\n        self.layers[name] = layer\n        self.add_module(name, layer)\n\n        layer.train(self.learning)\n        layer.compute_decays(self.dt)\n        layer.set_batch_size(self.batch_size)\n\n    def add_connection(\n        self, connection: AbstractConnection, source: str, target: str\n    ) -&gt; None:\n        # language=rst\n        \"\"\"\n        Adds a connection between layers of nodes to the network.\n\n        :param connection: An instance of class ``Connection``.\n        :param source: Logical name of the connection's source layer.\n        :param target: Logical name of the connection's target layer.\n        \"\"\"\n        self.connections[(source, target)] = connection\n        self.add_module(source + \"_to_\" + target, connection)\n\n        connection.dt = self.dt\n        connection.train(self.learning)\n\n    def add_monitor(self, monitor: AbstractMonitor, name: str) -&gt; None:\n        # language=rst\n        \"\"\"\n        Adds a monitor on a network object to the network.\n\n        :param monitor: An instance of class ``Monitor``.\n        :param name: Logical name of monitor object.\n        \"\"\"\n        self.monitors[name] = monitor\n        monitor.network = self\n        monitor.dt = self.dt\n\n    def save(self, file_name: str) -&gt; None:\n        # language=rst\n        \"\"\"\n        Serializes the network object to disk.\n\n        :param file_name: Path to store serialized network object on disk.\n\n        **Example:**\n\n        .. code-block:: python\n\n            import torch\n            import matplotlib.pyplot as plt\n\n            from pathlib          import Path\n            from bindsnet.network import *\n            from bindsnet.network import topology\n\n            # Build simple network.\n            network = Network(dt=1.0)\n\n            X = nodes.Input(100)  # Input layer.\n            Y = nodes.LIFNodes(100)  # Layer of LIF neurons.\n            C = topology.Connection(source=X, target=Y, w=torch.rand(X.n, Y.n))  # Connection from X to Y.\n\n            # Add everything to the network object.\n            network.add_layer(layer=X, name='X')\n            network.add_layer(layer=Y, name='Y')\n            network.add_connection(connection=C, source='X', target='Y')\n\n            # Save the network to disk.\n            network.save(str(Path.home()) + '/network.pt')\n        \"\"\"\n        torch.save(self, open(file_name, \"wb\"))\n\n    def clone(self) -&gt; \"Network\":\n        # language=rst\n        \"\"\"\n        Returns a cloned network object.\n\n        :return: A copy of this network.\n        \"\"\"\n        virtual_file = tempfile.SpooledTemporaryFile()\n        torch.save(self, virtual_file)\n        virtual_file.seek(0)\n        return torch.load(virtual_file)\n\n    def _get_inputs(self, layers: Iterable = None) -&gt; Dict[str, torch.Tensor]:\n        # language=rst\n        \"\"\"\n        Fetches outputs from network layers to use as input to downstream layers.\n\n        :param layers: Layers to update inputs for. Defaults to all network layers.\n        :return: Inputs to all layers for the current iteration.\n        \"\"\"\n        inputs = {}\n\n        if layers is None:\n            layers = self.layers\n\n        # Loop over network connections.\n        for c in self.connections:\n            if c[1] in layers:\n                # Fetch source and target populations.\n                source = self.connections[c].source\n                target = self.connections[c].target\n\n                if not c[1] in inputs:\n                    inputs[c[1]] = torch.zeros(\n                        self.batch_size, *target.shape, device=target.s.device\n                    )\n\n                # Add to input: source's spikes multiplied by connection weights.\n                inputs[c[1]] += self.connections[c].compute(source.s)\n\n        return inputs\n\n    def run(\n        self, inputs: Dict[str, torch.Tensor], time: int, one_step=False, **kwargs\n    ) -&gt; None:\n        # language=rst\n        \"\"\"\n        Simulate network for given inputs and time.\n\n        :param inputs: Dictionary of ``Tensor``s of shape ``[time, *input_shape]`` or\n                      ``[time, batch_size, *input_shape]``.\n        :param time: Simulation time.\n        :param one_step: Whether to run the network in \"feed-forward\" mode, where inputs\n            propagate all the way through the network in a single simulation time step.\n            Layers are updated in the order they are added to the network.\n\n        Keyword arguments:\n\n        :param Dict[str, torch.Tensor] clamp: Mapping of layer names to boolean masks if\n            neurons should be clamped to spiking. The ``Tensor``s have shape\n            ``[n_neurons]`` or ``[time, n_neurons]``.\n        :param Dict[str, torch.Tensor] unclamp: Mapping of layer names to boolean masks\n            if neurons should be clamped to not spiking. The ``Tensor``s should have\n            shape ``[n_neurons]`` or ``[time, n_neurons]``.\n        :param Dict[str, torch.Tensor] injects_v: Mapping of layer names to boolean\n            masks if neurons should be added voltage. The ``Tensor``s should have shape\n            ``[n_neurons]`` or ``[time, n_neurons]``.\n        :param Union[float, torch.Tensor] reward: Scalar value used in reward-modulated\n            learning.\n        :param Dict[Tuple[str], torch.Tensor] masks: Mapping of connection names to\n            boolean masks determining which weights to clamp to zero.\n\n        **Example:**\n\n        .. code-block:: python\n\n            import torch\n            import matplotlib.pyplot as plt\n\n            from bindsnet.network import Network\n            from bindsnet.network.nodes import Input\n            from bindsnet.network.monitors import Monitor\n\n            # Build simple network.\n            network = Network()\n            network.add_layer(Input(500), name='I')\n            network.add_monitor(Monitor(network.layers['I'], state_vars=['s']), 'I')\n\n            # Generate spikes by running Bernoulli trials on Uniform(0, 0.5) samples.\n            spikes = torch.bernoulli(0.5 * torch.rand(500, 500))\n\n            # Run network simulation.\n            network.run(inputs={'I' : spikes}, time=500)\n\n            # Look at input spiking activity.\n            spikes = network.monitors['I'].get('s')\n            plt.matshow(spikes, cmap='binary')\n            plt.xticks(()); plt.yticks(());\n            plt.xlabel('Time'); plt.ylabel('Neuron index')\n            plt.title('Input spiking')\n            plt.show()\n        \"\"\"\n        # Parse keyword arguments.\n        clamps = kwargs.get(\"clamp\", {})\n        unclamps = kwargs.get(\"unclamp\", {})\n        masks = kwargs.get(\"masks\", {})\n        injects_v = kwargs.get(\"injects_v\", {})\n\n        # Compute reward.\n        if self.reward_fn is not None:\n            kwargs[\"reward\"] = self.reward_fn.compute(**kwargs)\n\n        # Dynamic setting of batch size.\n        if inputs != {}:\n            for key in inputs:\n                # goal shape is [time, batch, n_0, ...]\n                if len(inputs[key].size()) == 1:\n                    # current shape is [n_0, ...]\n                    # unsqueeze twice to make [1, 1, n_0, ...]\n                    inputs[key] = inputs[key].unsqueeze(0).unsqueeze(0)\n                elif len(inputs[key].size()) == 2:\n                    # current shape is [time, n_0, ...]\n                    # unsqueeze dim 1 so that we have\n                    # [time, 1, n_0, ...]\n                    inputs[key] = inputs[key].unsqueeze(1)\n\n            for key in inputs:\n                # batch dimension is 1, grab this and use for batch size\n                if inputs[key].size(1) != self.batch_size:\n                    self.batch_size = inputs[key].size(1)\n\n                    for l in self.layers:\n                        self.layers[l].set_batch_size(self.batch_size)\n\n                    for m in self.monitors:\n                        self.monitors[m].reset_state_variables()\n\n                break\n\n        # Effective number of timesteps.\n        timesteps = int(time / self.dt)\n\n        # Simulate network activity for `time` timesteps.\n        for t in range(timesteps):\n            # Get input to all layers (synchronous mode).\n            current_inputs = {}\n            if not one_step:\n                current_inputs.update(self._get_inputs())\n\n            for l in self.layers:\n                # Update each layer of nodes.\n                if l in inputs:\n                    if l in current_inputs:\n                        current_inputs[l] += inputs[l][t]\n                    else:\n                        current_inputs[l] = inputs[l][t]\n\n                if one_step:\n                    # Get input to this layer (one-step mode).\n                    current_inputs.update(self._get_inputs(layers=[l]))\n\n                if l in current_inputs:\n                    self.layers[l].forward(x=current_inputs[l])\n                else:\n                    self.layers[l].forward(x=torch.zeros(self.layers[l].s.shape))\n\n                # Clamp neurons to spike.\n                clamp = clamps.get(l, None)\n                if clamp is not None:\n                    if clamp.ndimension() == 1:\n                        self.layers[l].s[:, clamp] = 1\n                    else:\n                        self.layers[l].s[:, clamp[t]] = 1\n\n                # Clamp neurons not to spike.\n                unclamp = unclamps.get(l, None)\n                if unclamp is not None:\n                    if unclamp.ndimension() == 1:\n                        self.layers[l].s[:, unclamp] = 0\n                    else:\n                        self.layers[l].s[:, unclamp[t]] = 0\n\n                # Inject voltage to neurons.\n                inject_v = injects_v.get(l, None)\n                if inject_v is not None:\n                    if inject_v.ndimension() == 1:\n                        self.layers[l].v += inject_v\n                    else:\n                        self.layers[l].v += inject_v[t]\n\n            # Run synapse updates.\n            for c in self.connections:\n                self.connections[c].update(\n                    mask=masks.get(c, None), learning=self.learning, **kwargs\n                )\n\n            # # Get input to all layers.\n            # current_inputs.update(self._get_inputs())\n\n            # Record state variables of interest.\n            for m in self.monitors:\n                self.monitors[m].record()\n\n        # Re-normalize connections.\n        for c in self.connections:\n            self.connections[c].normalize()\n\n    def reset_state_variables(self) -&gt; None:\n        # language=rst\n        \"\"\"\n        Reset state variables of objects in network.\n        \"\"\"\n        for layer in self.layers:\n            self.layers[layer].reset_state_variables()\n\n        for connection in self.connections:\n            self.connections[connection].reset_state_variables()\n\n        for monitor in self.monitors:\n            self.monitors[monitor].reset_state_variables()\n\n    def train(self, mode: bool = True) -&gt; \"torch.nn.Module\":\n        # language=rst\n        \"\"\"\n        Sets the node in training mode.\n\n        :param mode: Turn training on or off.\n\n        :return: ``self`` as specified in ``torch.nn.Module``.\n        \"\"\"\n        self.learning = mode\n        return super().train(mode)\n</code></pre>",656          "post_number": 3,657          "post_type": 1,658          "posts_count": 9,659          "updated_at": "2020-11-28T07:33:52.155Z",660          "reply_count": 0,661          "reply_to_post_number": null,662          "quote_count": 0,663          "incoming_link_count": 4,664          "reads": 37,665          "readers_count": 36,666          "score": 27.4,667          "yours": false,668          "topic_id": 104296,669          "topic_slug": "torch-nn-modules-module-moduleattributeerror-network-object-has-no-attribute-reset",670          "display_username": "Ryunosuke0723",671          "primary_group_name": null,672          "flair_name": null,673          "flair_url": null,674          "flair_bg_color": null,675          "flair_color": null,676          "flair_group_id": null,677          "badges_granted": [],678          "version": 2,679          "can_edit": false,680          "can_delete": false,681          "can_recover": false,682          "can_see_hidden_post": false,683          "can_wiki": false,684          "read": true,685          "user_title": null,686          "bookmarked": false,687          "actions_summary": [],688          "moderator": false,689          "admin": false,690          "staff": false,691          "user_id": 38958,692          "hidden": false,693          "trust_level": 1,694          "deleted_at": null,695          "user_deleted": false,696          "edit_reason": null,697          "can_view_edit_history": true,698          "wiki": false,699          "post_url": "/t/torch-nn-modules-module-moduleattributeerror-network-object-has-no-attribute-reset/104296/3",700          "can_accept_answer": false,701          "can_unaccept_answer": false,702          "accepted_answer": false,703          "topic_accepted_answer": null704        },705        {706          "id": 247735,707          "name": "Ryunosuke0723",708          "username": "ryunosuke0723",709          "avatar_template": "/letter_avatar_proxy/v4/letter/r/b77776/{size}.png",710          "created_at": "2020-11-28T09:48:05.931Z",711          "cooked": "<p>I thought I would probably use a function called train here, but I don’t know how to adapt it.</p>\n<pre><code class=\"lang-auto\">    def train(self, mode: bool = True) -&gt; \"torch.nn.Module\":\n        # language=rst\n        \"\"\"\n        Sets the node in training mode.\n\n        :param mode: Turn training on or off.\n\n        :return: ``self`` as specified in ``torch.nn.Module``.\n        \"\"\"\n        self.learning = mode\n        return super().train(mode)\n</code></pre>",712          "post_number": 4,713          "post_type": 1,714          "posts_count": 9,715          "updated_at": "2020-11-28T09:48:05.931Z",716          "reply_count": 1,717          "reply_to_post_number": null,718          "quote_count": 0,719          "incoming_link_count": 7,720          "reads": 26,721          "readers_count": 25,722          "score": 45.2,723          "yours": false,724          "topic_id": 104296,725          "topic_slug": "torch-nn-modules-module-moduleattributeerror-network-object-has-no-attribute-reset",726          "display_username": "Ryunosuke0723",727          "primary_group_name": null,728          "flair_name": null,729          "flair_url": null,730          "flair_bg_color": null,731          "flair_color": null,732          "flair_group_id": null,733          "badges_granted": [],734          "version": 1,735          "can_edit": false,736          "can_delete": false,737          "can_recover": false,738          "can_see_hidden_post": false,739          "can_wiki": false,740          "read": true,741          "user_title": null,742          "bookmarked": false,743          "actions_summary": [],744          "moderator": false,745          "admin": false,746          "staff": false,747          "user_id": 38958,748          "hidden": false,749          "trust_level": 1,750          "deleted_at": null,751          "user_deleted": false,752          "edit_reason": null,753          "can_view_edit_history": true,754          "wiki": false,755          "post_url": "/t/torch-nn-modules-module-moduleattributeerror-network-object-has-no-attribute-reset/104296/4",756          "can_accept_answer": false,757          "can_unaccept_answer": false,758          "accepted_answer": false,759          "topic_accepted_answer": null760        },761        {762          "id": 247983,763          "name": "",764          "username": "ptrblck",765          "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",766          "created_at": "2020-11-30T00:49:45.058Z",767          "cooked": "<p>I’m unsure if this is a new issue and the old one is solved already.<br>\nDid you manage to figure out, which module expects the <code>reset_</code> method and could you explain your new issue a bit more?</p>",768          "post_number": 5,769          "post_type": 1,770          "posts_count": 9,771          "updated_at": "2020-11-30T00:49:45.058Z",772          "reply_count": 0,773          "reply_to_post_number": 4,774          "quote_count": 0,775          "incoming_link_count": 4,776          "reads": 21,777          "readers_count": 20,778          "score": 24.2,779          "yours": false,780          "topic_id": 104296,781          "topic_slug": "torch-nn-modules-module-moduleattributeerror-network-object-has-no-attribute-reset",782          "display_username": "",783          "primary_group_name": null,784          "flair_name": null,785          "flair_url": null,786          "flair_bg_color": null,787          "flair_color": null,788          "flair_group_id": null,789          "badges_granted": [],790          "version": 1,791          "can_edit": false,792          "can_delete": false,793          "can_recover": false,794          "can_see_hidden_post": false,795          "can_wiki": false,796          "read": true,797          "user_title": "",798          "reply_to_user": {799            "id": 38958,800            "username": "ryunosuke0723",801            "name": "Ryunosuke0723",802            "avatar_template": "/letter_avatar_proxy/v4/letter/r/b77776/{size}.png"803          },804          "bookmarked": false,805          "actions_summary": [],806          "moderator": true,807          "admin": true,808          "staff": true,809          "user_id": 3534,810          "hidden": false,811          "trust_level": 2,812          "deleted_at": null,813          "user_deleted": false,814          "edit_reason": null,815          "can_view_edit_history": true,816          "wiki": false,817          "post_url": "/t/torch-nn-modules-module-moduleattributeerror-network-object-has-no-attribute-reset/104296/5",818          "can_accept_answer": false,819          "can_unaccept_answer": false,820          "accepted_answer": false,821          "topic_accepted_answer": null822        },823        {824          "id": 248070,825          "name": "Ryunosuke0723",826          "username": "ryunosuke0723",827          "avatar_template": "/letter_avatar_proxy/v4/letter/r/b77776/{size}.png",828          "created_at": "2020-11-30T08:18:00.543Z",829          "cooked": "<p>As you say, I searched for network_reset ().<br>\nAn error occurred because the function was not defined. I decided to learn with epoch.</p>",830          "post_number": 6,831          "post_type": 1,832          "posts_count": 9,833          "updated_at": "2020-11-30T08:18:00.543Z",834          "reply_count": 0,835          "reply_to_post_number": null,836          "quote_count": 0,837          "incoming_link_count": 0,838          "reads": 19,839          "readers_count": 18,840          "score": 3.8,841          "yours": false,842          "topic_id": 104296,843          "topic_slug": "torch-nn-modules-module-moduleattributeerror-network-object-has-no-attribute-reset",844          "display_username": "Ryunosuke0723",845          "primary_group_name": null,846          "flair_name": null,847          "flair_url": null,848          "flair_bg_color": null,849          "flair_color": null,850          "flair_group_id": null,851          "badges_granted": [],852          "version": 1,853          "can_edit": false,854          "can_delete": false,855          "can_recover": false,856          "can_see_hidden_post": false,857          "can_wiki": false,858          "read": true,859          "user_title": null,860          "bookmarked": false,861          "actions_summary": [],862          "moderator": false,863          "admin": false,864          "staff": false,865          "user_id": 38958,866          "hidden": false,867          "trust_level": 1,868          "deleted_at": null,869          "user_deleted": false,870          "edit_reason": null,871          "can_view_edit_history": true,872          "wiki": false,873          "post_url": "/t/torch-nn-modules-module-moduleattributeerror-network-object-has-no-attribute-reset/104296/6",874          "can_accept_answer": false,875          "can_unaccept_answer": false,876          "accepted_answer": false,877          "topic_accepted_answer": null878        },879        {880          "id": 262873,881          "name": "mahsa",882          "username": "mahsa-ebrahimian",883          "avatar_template": "/user_avatar/discuss.pytorch.org/mahsa-ebrahimian/{size}/34545_2.png",884          "created_at": "2021-02-10T14:57:41.998Z",885          "cooked": "<p>Hi<br>\nI am having the exact same problem,<br>\n‘Network’ object has no attribute ‘reset_’</p>\n<p>How did you manage to solve this?</p>",886          "post_number": 7,887          "post_type": 1,888          "posts_count": 9,889          "updated_at": "2021-02-10T14:57:41.998Z",890          "reply_count": 2,891          "reply_to_post_number": null,892          "quote_count": 0,893          "incoming_link_count": 2,894          "reads": 14,895          "readers_count": 13,896          "score": 22.8,897          "yours": false,898          "topic_id": 104296,899          "topic_slug": "torch-nn-modules-module-moduleattributeerror-network-object-has-no-attribute-reset",900          "display_username": "mahsa",901          "primary_group_name": null,902          "flair_name": null,903          "flair_url": null,904          "flair_bg_color": null,905          "flair_color": null,906          "flair_group_id": null,907          "badges_granted": [],908          "version": 1,909          "can_edit": false,910          "can_delete": false,911          "can_recover": false,912          "can_see_hidden_post": false,913          "can_wiki": false,914          "read": true,915          "user_title": null,916          "bookmarked": false,917          "actions_summary": [],918          "moderator": false,919          "admin": false,920          "staff": false,921          "user_id": 41973,922          "hidden": false,923          "trust_level": 1,924          "deleted_at": null,925          "user_deleted": false,926          "edit_reason": null,927          "can_view_edit_history": true,928          "wiki": false,929          "post_url": "/t/torch-nn-modules-module-moduleattributeerror-network-object-has-no-attribute-reset/104296/7",930          "can_accept_answer": false,931          "can_unaccept_answer": false,932          "accepted_answer": false,933          "topic_accepted_answer": null934        },935        {936          "id": 263046,937          "name": "",938          "username": "ptrblck",939          "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",940          "created_at": "2021-02-11T07:26:45.584Z",941          "cooked": "<p>Could you post the complete stack trace, please?</p>",942          "post_number": 8,943          "post_type": 1,944          "posts_count": 9,945          "updated_at": "2021-02-11T07:26:45.584Z",946          "reply_count": 0,947          "reply_to_post_number": 7,948          "quote_count": 0,949          "incoming_link_count": 2,950          "reads": 13,951          "readers_count": 12,952          "score": 12.6,953          "yours": false,954          "topic_id": 104296,955          "topic_slug": "torch-nn-modules-module-moduleattributeerror-network-object-has-no-attribute-reset",956          "display_username": "",957          "primary_group_name": null,958          "flair_name": null,959          "flair_url": null,960          "flair_bg_color": null,961          "flair_color": null,962          "flair_group_id": null,963          "badges_granted": [],964          "version": 1,965          "can_edit": false,966          "can_delete": false,967          "can_recover": false,968          "can_see_hidden_post": false,969          "can_wiki": false,970          "read": true,971          "user_title": "",972          "reply_to_user": {973            "id": 41973,974            "username": "mahsa-ebrahimian",975            "name": "mahsa",976            "avatar_template": "/user_avatar/discuss.pytorch.org/mahsa-ebrahimian/{size}/34545_2.png"977          },978          "bookmarked": false,979          "actions_summary": [],980          "moderator": true,981          "admin": true,982          "staff": true,983          "user_id": 3534,984          "hidden": false,985          "trust_level": 2,986          "deleted_at": null,987          "user_deleted": false,988          "edit_reason": null,989          "can_view_edit_history": true,990          "wiki": false,991          "post_url": "/t/torch-nn-modules-module-moduleattributeerror-network-object-has-no-attribute-reset/104296/8",992          "can_accept_answer": false,993          "can_unaccept_answer": false,994          "accepted_answer": false,995          "topic_accepted_answer": null996        },997        {998          "id": 266928,999          "name": "Ryunosuke0723",1000          "username": "ryunosuke0723",1001          "avatar_template": "/letter_avatar_proxy/v4/letter/r/b77776/{size}.png",1002          "created_at": "2021-03-01T13:44:17.157Z",1003          "cooked": "<p>Sorry for the late reply to the comment.<br>\nbindsnet.network You need to declare “reset_ ()” yourself as a function from the import Network.<br>\nCheck “Class Network”.<br>\nIn addition, these functional declarations are written in a journal named “Frontier”.<br>\nYou can find it by searching for “Frontier Spiking Neural Nets”.</p>",1004          "post_number": 9,1005          "post_type": 1,1006          "posts_count": 9,1007          "updated_at": "2021-03-01T13:44:17.157Z",1008          "reply_count": 0,1009          "reply_to_post_number": 7,1010          "quote_count": 0,1011          "incoming_link_count": 5,1012          "reads": 11,1013          "readers_count": 10,1014          "score": 27.2,1015          "yours": false,1016          "topic_id": 104296,1017          "topic_slug": "torch-nn-modules-module-moduleattributeerror-network-object-has-no-attribute-reset",1018          "display_username": "Ryunosuke0723",1019          "primary_group_name": null,1020          "flair_name": null,1021          "flair_url": null,1022          "flair_bg_color": null,1023          "flair_color": null,1024          "flair_group_id": null,1025          "badges_granted": [],1026          "version": 1,1027          "can_edit": false,1028          "can_delete": false,1029          "can_recover": false,1030          "can_see_hidden_post": false,1031          "can_wiki": false,1032          "read": true,1033          "user_title": null,1034          "reply_to_user": {1035            "id": 41973,1036            "username": "mahsa-ebrahimian",1037            "name": "mahsa",1038            "avatar_template": "/user_avatar/discuss.pytorch.org/mahsa-ebrahimian/{size}/34545_2.png"1039          },1040          "bookmarked": false,1041          "actions_summary": [],1042          "moderator": false,1043          "admin": false,1044          "staff": false,1045          "user_id": 38958,1046          "hidden": false,1047          "trust_level": 1,1048          "deleted_at": null,1049          "user_deleted": false,1050          "edit_reason": null,1051          "can_view_edit_history": true,1052          "wiki": false,1053          "post_url": "/t/torch-nn-modules-module-moduleattributeerror-network-object-has-no-attribute-reset/104296/9",1054          "can_accept_answer": false,1055          "can_unaccept_answer": false,1056          "accepted_answer": false,1057          "topic_accepted_answer": null1058        }1059      ],1060      "stream": [1061        247422,1062        247424,1063        247464,1064        247735,1065        247983,1066        248070,1067        262873,1068        263046,1069        2669281070      ]1071    },1072    "timeline_lookup": [1073      [1074        1,1075        17941076      ],1077      [1078        4,1079        17931080      ],1081      [1082        5,1083        17911084      ],1085      [1086        7,1087        17181088      ],1089      [1090        9,1091        16991092      ]1093    ],1094    "suggested_topics": [1095      {1096        "fancy_title": "Multiple Models Performance Degrades",1097        "id": 217997,1098        "title": "Multiple Models Performance Degrades",1099        "slug": "multiple-models-performance-degrades",1100        "posts_count": 1,1101        "reply_count": 0,1102        "highest_post_number": 1,1103        "image_url": "https://discuss.pytorch.org/uploads/default/optimized/3X/1/c/1c795da9ca2096fc66e9c4b0b865a7995bda649b_2_1024x315.png",1104        "created_at": "2025-03-18T18:03:18.722Z",1105        "last_posted_at": "2025-03-18T18:03:18.772Z",1106        "bumped": true,1107        "bumped_at": "2025-03-18T18:03:18.772Z",1108        "archetype": "regular",1109        "unseen": false,1110        "pinned": false,1111        "unpinned": null,1112        "visible": true,1113        "closed": false,1114        "archived": false,1115        "bookmarked": null,1116        "liked": null,1117        "tags_descriptions": {},1118        "like_count": 0,1119        "views": 28,1120        "category_id": 1,1121        "featured_link": null,1122        "has_accepted_answer": false,1123        "posters": [1124          {1125            "extras": "latest single",1126            "description": "Original Poster, Most Recent Poster",1127            "user": {1128              "id": 81841,1129              "username": "goofydoge",1130              "name": null,1131              "avatar_template": "/letter_avatar_proxy/v4/letter/g/8c91f0/{size}.png",1132              "trust_level": 11133            }1134          }1135        ]1136      },1137      {1138        "fancy_title": "Torch.multinomial with generator is not determinstic under certain conditions",1139        "id": 219780,1140        "title": "Torch.multinomial with generator is not determinstic under certain conditions",1141        "slug": "torch-multinomial-with-generator-is-not-determinstic-under-certain-conditions",1142        "posts_count": 2,1143        "reply_count": 0,1144        "highest_post_number": 2,1145        "image_url": null,1146        "created_at": "2025-05-05T18:58:56.840Z",1147        "last_posted_at": "2025-05-05T19:31:05.918Z",1148        "bumped": true,1149        "bumped_at": "2025-05-05T19:31:05.918Z",1150        "archetype": "regular",1151        "unseen": false,1152        "pinned": false,1153        "unpinned": null,1154        "visible": true,1155        "closed": false,1156        "archived": false,1157        "bookmarked": null,1158        "liked": null,1159        "tags_descriptions": {},1160        "like_count": 0,1161        "views": 34,1162        "category_id": 1,1163        "featured_link": null,1164        "has_accepted_answer": false,1165        "posters": [1166          {1167            "extras": null,1168            "description": "Original Poster",1169            "user": {1170              "id": 84161,1171              "username": "szvsw",1172              "name": "Sam Wolk",1173              "avatar_template": "/user_avatar/discuss.pytorch.org/szvsw/{size}/76920_2.png",1174              "trust_level": 01175            }1176          },1177          {1178            "extras": "latest",1179            "description": "Most Recent Poster",1180            "user": {1181              "id": 3534,1182              "username": "ptrblck",1183              "name": "",1184              "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",1185              "admin": true,1186              "moderator": true,1187              "trust_level": 21188            }1189          }1190        ]1191      },1192      {1193        "fancy_title": "How to run PyTorch DDP with Hydra + Optuna?",1194        "id": 213316,1195        "title": "How to run PyTorch DDP with Hydra + Optuna?",1196        "slug": "how-to-run-pytorch-ddp-with-hydra-optuna",1197        "posts_count": 1,1198        "reply_count": 0,1199        "highest_post_number": 1,1200        "image_url": null,

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