Anurag1734/cuda-error-resolution-analysis
07
1[2 {3 "post_stream": {4 "posts": [5 {6 "id": 120513,7 "name": "Anuj Chopra",8 "username": "Anuj_Chopra",9 "avatar_template": "/user_avatar/discuss.pytorch.org/anuj_chopra/{size}/9425_2.png",10 "created_at": "2019-07-02T05:24:15.685Z",11 "cooked": "<p>I want to create a simple gru which counts the number of ones in a sequence of 0s and 1s. Example<br>\ninput = 100110, output = 3<br>\ninput = 101, output = 2<br>\ninput = 10001110101, output = 6</p>\n<p>This is the way I have made my model.</p>\n<pre><code class=\"lang-auto\">class Counter(NN.Module):\n def __init__(self, input_size,hidden_size, output_size):\n super(Counter, self).__init__()\n self.embed = NN.Embedding(input_size,hidden_size,)\n self.hidden_size = hidden_size\n self.output_size = output_size\n self.gru = NN.GRU(hidden_size,hidden_size, batch_first = True,)\n self.linear = NN.Linear(hidden_size, output_size)\n \n def forward(self,inputs, hidden = 0):\n embedded = self.embed(inputs)\n gru_out, gru_hid = self.gru(embedded)\n final_out = self.linear(gru_out[:,-1])\n return final_out\n\n</code></pre>\n<p>Now I make an object of this class with input size = 2 (0 or 1 which goes in embedding), hidden size = 5, and output size = 1 (total count of 1s in the number).<br>\nThe losses and optimizer are:</p>\n<pre><code class=\"lang-auto\">cc = Counter(2,5,1)\ncriterion = NN.MSELoss()\noptimizer = optim.SGD(cc.parameters(),lr = 0.01)\n</code></pre>\n<p>I am making my inputs and outputs through this function:</p>\n<pre><code class=\"lang-auto\">def get_number(digits = 10):\n ones = np.random.choice(digits)\n l = [1 if i < ones else 0 for i in range(digits)]\n l = np.random.permutation(l)\n return l, ones\n</code></pre>\n<p>Now I am simply iterating multiple times to train. I also used scheduler and decaying learning rate. But I am not getting any good results. All I get is some value (close to average value of ones).</p>\n<pre><code class=\"lang-auto\">digits = 10\nfor r in range(iterations):\n cc.zero_grad()\n inputs = []\n labels = []\n for b in range(batch_size):\n p,q = get_number(digits)\n inputs.append(p)\n labels.append(q *1.0)\n outputs = cc.forward(torch.tensor(inputs))\n loss = criterion(outputs, torch.tensor(labels))\n temp_loss.append(loss.data.numpy())\n loss.backward()\n optimizer.step()\n</code></pre>\n<p>So here, since digits = 10, therefore I will get a model which predicts some value close to 5 everytime. <img src=\"https://discuss.pytorch.org/images/emoji/apple/expressionless.png?v=9\" title=\":expressionless:\" class=\"emoji\" alt=\":expressionless:\"><br>\nI guess it has something to do with gru, hidden layer because that is something which is still unclear to me. Please help.</p>",12 "post_number": 1,13 "post_type": 1,14 "posts_count": 5,15 "updated_at": "2019-07-04T06:19:19.828Z",16 "reply_count": 0,17 "reply_to_post_number": null,18 "quote_count": 0,19 "incoming_link_count": 82,20 "reads": 13,21 "readers_count": 12,22 "score": 412.6,23 "yours": false,24 "topic_id": 49433,25 "topic_slug": "gru-for-creating-a-simple-ones-counter",26 "display_username": "Anuj Chopra",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": 3,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": 15900,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/gru-for-creating-a-simple-ones-counter/49433/1",56 "can_accept_answer": false,57 "can_unaccept_answer": false,58 "accepted_answer": false,59 "topic_accepted_answer": null,60 "can_vote": false61 },62 {63 "id": 120519,64 "name": "Anuj Chopra",65 "username": "Anuj_Chopra",66 "avatar_template": "/user_avatar/discuss.pytorch.org/anuj_chopra/{size}/9425_2.png",67 "created_at": "2019-07-02T05:56:47.005Z",68 "cooked": "<p>I tried using L1loss, but getting similar results.</p>",69 "post_number": 2,70 "post_type": 1,71 "posts_count": 5,72 "updated_at": "2019-07-02T05:56:47.005Z",73 "reply_count": 1,74 "reply_to_post_number": null,75 "quote_count": 0,76 "incoming_link_count": 1,77 "reads": 14,78 "readers_count": 13,79 "score": 12.8,80 "yours": false,81 "topic_id": 49433,82 "topic_slug": "gru-for-creating-a-simple-ones-counter",83 "display_username": "Anuj Chopra",84 "primary_group_name": null,85 "flair_name": null,86 "flair_url": null,87 "flair_bg_color": null,88 "flair_color": null,89 "flair_group_id": null,90 "badges_granted": [],91 "version": 1,92 "can_edit": false,93 "can_delete": false,94 "can_recover": false,95 "can_see_hidden_post": false,96 "can_wiki": false,97 "read": true,98 "user_title": null,99 "bookmarked": false,100 "actions_summary": [],101 "moderator": false,102 "admin": false,103 "staff": false,104 "user_id": 15900,105 "hidden": false,106 "trust_level": 2,107 "deleted_at": null,108 "user_deleted": false,109 "edit_reason": null,110 "can_view_edit_history": true,111 "wiki": false,112 "post_url": "/t/gru-for-creating-a-simple-ones-counter/49433/2",113 "can_accept_answer": false,114 "can_unaccept_answer": false,115 "accepted_answer": false,116 "topic_accepted_answer": null117 },118 {119 "id": 121618,120 "name": "Chris",121 "username": "vdw",122 "avatar_template": "/user_avatar/discuss.pytorch.org/vdw/{size}/10074_2.png",123 "created_at": "2019-07-07T00:15:32.418Z",124 "cooked": "<p>OK, I have to ask: Why would you ever try to train an RNN to count the number of 1’s in a binary string? I actually don’t think this is a suitable task for a neural network. For once, your output is not bounded.</p>\n<p>Apart from that, why do you have an embedding layer? Your inputs are already numeric values. Embeddings are mainly needed to map words to meaningful vector representations for NLP tasks.</p>",125 "post_number": 3,126 "post_type": 1,127 "posts_count": 5,128 "updated_at": "2019-07-07T00:15:32.418Z",129 "reply_count": 1,130 "reply_to_post_number": 2,131 "quote_count": 0,132 "incoming_link_count": 0,133 "reads": 12,134 "readers_count": 11,135 "score": 7.4,136 "yours": false,137 "topic_id": 49433,138 "topic_slug": "gru-for-creating-a-simple-ones-counter",139 "display_username": "Chris",140 "primary_group_name": null,141 "flair_name": null,142 "flair_url": null,143 "flair_bg_color": null,144 "flair_color": null,145 "flair_group_id": null,146 "badges_granted": [],147 "version": 1,148 "can_edit": false,149 "can_delete": false,150 "can_recover": false,151 "can_see_hidden_post": false,152 "can_wiki": false,153 "read": true,154 "user_title": null,155 "reply_to_user": {156 "id": 15900,157 "username": "Anuj_Chopra",158 "name": "Anuj Chopra",159 "avatar_template": "/user_avatar/discuss.pytorch.org/anuj_chopra/{size}/9425_2.png"160 },161 "bookmarked": false,162 "actions_summary": [],163 "moderator": false,164 "admin": false,165 "staff": false,166 "user_id": 1438,167 "hidden": false,168 "trust_level": 2,169 "deleted_at": null,170 "user_deleted": false,171 "edit_reason": null,172 "can_view_edit_history": true,173 "wiki": false,174 "post_url": "/t/gru-for-creating-a-simple-ones-counter/49433/3",175 "can_accept_answer": false,176 "can_unaccept_answer": false,177 "accepted_answer": false,178 "topic_accepted_answer": null179 },180 {181 "id": 121761,182 "name": "Anuj Chopra",183 "username": "Anuj_Chopra",184 "avatar_template": "/user_avatar/discuss.pytorch.org/anuj_chopra/{size}/9425_2.png",185 "created_at": "2019-07-08T05:58:18.003Z",186 "cooked": "<p>Why would you ever try to train an RNN to count the number of 1’s in a binary string?<br>\nI am doing this for my own learning. In theory rnn should be able to do this task. It is not impossible to do this.<br>\nApart from that, why do you have an embedding layer?<br>\nI have an embedding layer (which I think will not deteriorate the performance) because once I am successful in this task, I plan to make a “A” counter or any other alphabet/character counter. I know we can make counters just by regex, but rnn should also be able to do this. I was able to make a rnn which counted “1” if I sent the string one-by-one (hidden state has the count till now, input is the next value 1/0 and output is either count+1 or count) . But that is an easy task for rnn, just take decision either to add or not to add. I wanted to make a rnn which carries the count in its hidden state.<br>\nIn case you have any suggestion/solution, it would be of great help.</p>",187 "post_number": 4,188 "post_type": 1,189 "posts_count": 5,190 "updated_at": "2019-07-08T06:27:19.663Z",191 "reply_count": 0,192 "reply_to_post_number": 3,193 "quote_count": 0,194 "incoming_link_count": 3,195 "reads": 11,196 "readers_count": 10,197 "score": 17.2,198 "yours": false,199 "topic_id": 49433,200 "topic_slug": "gru-for-creating-a-simple-ones-counter",201 "display_username": "Anuj Chopra",202 "primary_group_name": null,203 "flair_name": null,204 "flair_url": null,205 "flair_bg_color": null,206 "flair_color": null,207 "flair_group_id": null,208 "badges_granted": [],209 "version": 2,210 "can_edit": false,211 "can_delete": false,212 "can_recover": false,213 "can_see_hidden_post": false,214 "can_wiki": false,215 "read": true,216 "user_title": null,217 "reply_to_user": {218 "id": 1438,219 "username": "vdw",220 "name": "Chris",221 "avatar_template": "/user_avatar/discuss.pytorch.org/vdw/{size}/10074_2.png"222 },223 "bookmarked": false,224 "actions_summary": [],225 "moderator": false,226 "admin": false,227 "staff": false,228 "user_id": 15900,229 "hidden": false,230 "trust_level": 2,231 "deleted_at": null,232 "user_deleted": false,233 "edit_reason": null,234 "can_view_edit_history": true,235 "wiki": false,236 "post_url": "/t/gru-for-creating-a-simple-ones-counter/49433/4",237 "can_accept_answer": false,238 "can_unaccept_answer": false,239 "accepted_answer": false,240 "topic_accepted_answer": null241 },242 {243 "id": 124906,244 "name": "Anuj Chopra",245 "username": "Anuj_Chopra",246 "avatar_template": "/user_avatar/discuss.pytorch.org/anuj_chopra/{size}/9425_2.png",247 "created_at": "2019-07-23T11:09:17.613Z",248 "cooked": "<p>I was able to do this perfectly. I was making very basic mistake in calculating loss. Instead of<br>\n<code>loss = criterion(outputs, torch.tensor(labels))</code><br>\nI needed to use<br>\n<code>loss = criterion(outputs[:,0], torch.tensor(labels))</code><br>\nand the model works perfectly. Infact GRU does it very well. Anyways thanks for trying to help me.</p>",249 "post_number": 5,250 "post_type": 1,251 "posts_count": 5,252 "updated_at": "2019-07-23T11:09:17.613Z",253 "reply_count": 0,254 "reply_to_post_number": null,255 "quote_count": 0,256 "incoming_link_count": 1,257 "reads": 6,258 "readers_count": 5,259 "score": 6.2,260 "yours": false,261 "topic_id": 49433,262 "topic_slug": "gru-for-creating-a-simple-ones-counter",263 "display_username": "Anuj Chopra",264 "primary_group_name": null,265 "flair_name": null,266 "flair_url": null,267 "flair_bg_color": null,268 "flair_color": null,269 "flair_group_id": null,270 "badges_granted": [],271 "version": 1,272 "can_edit": false,273 "can_delete": false,274 "can_recover": false,275 "can_see_hidden_post": false,276 "can_wiki": false,277 "read": true,278 "user_title": null,279 "bookmarked": false,280 "actions_summary": [],281 "moderator": false,282 "admin": false,283 "staff": false,284 "user_id": 15900,285 "hidden": false,286 "trust_level": 2,287 "deleted_at": null,288 "user_deleted": false,289 "edit_reason": null,290 "can_view_edit_history": true,291 "wiki": false,292 "post_url": "/t/gru-for-creating-a-simple-ones-counter/49433/5",293 "can_accept_answer": false,294 "can_unaccept_answer": false,295 "accepted_answer": false,296 "topic_accepted_answer": null297 }298 ],299 "stream": [300 120513,301 120519,302 121618,303 121761,304 124906305 ]306 },307 "timeline_lookup": [308 [309 1,310 2308311 ],312 [313 3,314 2303315 ],316 [317 4,318 2302319 ],320 [321 5,322 2287323 ]324 ],325 "suggested_topics": [326 {327 "fancy_title": "Teacher forcing ratio",328 "id": 212703,329 "title": "Teacher forcing ratio",330 "slug": "teacher-forcing-ratio",331 "posts_count": 1,332 "reply_count": 0,333 "highest_post_number": 1,334 "image_url": null,335 "created_at": "2024-11-08T11:35:52.668Z",336 "last_posted_at": "2024-11-08T11:35:52.730Z",337 "bumped": true,338 "bumped_at": "2024-11-08T12:02:44.140Z",339 "archetype": "regular",340 "unseen": false,341 "pinned": false,342 "unpinned": null,343 "visible": true,344 "closed": false,345 "archived": false,346 "bookmarked": null,347 "liked": null,348 "tags_descriptions": {},349 "like_count": 0,350 "views": 268,351 "category_id": 8,352 "featured_link": null,353 "has_accepted_answer": false,354 "posters": [355 {356 "extras": "latest single",357 "description": "Original Poster, Most Recent Poster",358 "user": {359 "id": 77701,360 "username": "MLangner",361 "name": "",362 "avatar_template": "/letter_avatar_proxy/v4/letter/m/34f0e0/{size}.png",363 "trust_level": 1364 }365 }366 ]367 },368 {369 "fancy_title": "combining TEXT.build_vocab with BERT Embedding",370 "id": 215914,371 "title": "combining TEXT.build_vocab with BERT Embedding",372 "slug": "combining-text-build-vocab-with-bert-embedding",373 "posts_count": 1,374 "reply_count": 0,375 "highest_post_number": 1,376 "image_url": null,377 "created_at": "2025-01-27T03:28:57.212Z",378 "last_posted_at": "2025-01-27T03:28:57.243Z",379 "bumped": true,380 "bumped_at": "2025-01-27T03:28:57.243Z",381 "archetype": "regular",382 "unseen": false,383 "pinned": false,384 "unpinned": null,385 "visible": true,386 "closed": false,387 "archived": false,388 "bookmarked": null,389 "liked": null,390 "tags_descriptions": {},391 "like_count": 0,392 "views": 70,393 "category_id": 8,394 "featured_link": null,395 "has_accepted_answer": false,396 "posters": [397 {398 "extras": "latest single",399 "description": "Original Poster, Most Recent Poster",400 "user": {401 "id": 82334,402 "username": "Muhammad_Alfian",403 "name": "Muhammad Alfian",404 "avatar_template": "/user_avatar/discuss.pytorch.org/muhammad_alfian/{size}/75314_2.png",405 "trust_level": 1406 }407 }408 ]409 },410 {411 "fancy_title": "Feed a model with cumulative sum of sampled classified sequences",412 "id": 216055,413 "title": "Feed a model with cumulative sum of sampled classified sequences",414 "slug": "feed-a-model-with-cumulative-sum-of-sampled-classified-sequences",415 "posts_count": 1,416 "reply_count": 0,417 "highest_post_number": 1,418 "image_url": null,419 "created_at": "2025-01-30T15:22:32.244Z",420 "last_posted_at": "2025-01-30T15:22:32.285Z",421 "bumped": true,422 "bumped_at": "2025-01-30T15:22:32.285Z",423 "archetype": "regular",424 "unseen": false,425 "pinned": false,426 "unpinned": null,427 "visible": true,428 "closed": false,429 "archived": false,430 "bookmarked": null,431 "liked": null,432 "tags_descriptions": {},433 "like_count": 0,434 "views": 32,435 "category_id": 8,436 "featured_link": null,437 "has_accepted_answer": false,438 "posters": [439 {440 "extras": "latest single",441 "description": "Original Poster, Most Recent Poster",442 "user": {443 "id": 82401,444 "username": "Seam1",445 "name": "Seam",446 "avatar_template": "/user_avatar/discuss.pytorch.org/seam1/{size}/75384_2.png",447 "trust_level": 1448 }449 }450 ]451 },452 {453 "fancy_title": "Flex_attention returning logits",454 "id": 213820,455 "title": "Flex_attention returning logits",456 "slug": "flex-attention-returning-logits",457 "posts_count": 1,458 "reply_count": 0,459 "highest_post_number": 1,460 "image_url": null,461 "created_at": "2024-12-04T23:23:39.405Z",462 "last_posted_at": "2024-12-04T23:23:39.455Z",463 "bumped": true,464 "bumped_at": "2024-12-04T23:23:39.455Z",465 "archetype": "regular",466 "unseen": false,467 "pinned": false,468 "unpinned": null,469 "visible": true,470 "closed": false,471 "archived": false,472 "bookmarked": null,473 "liked": null,474 "tags_descriptions": {},475 "like_count": 0,476 "views": 103,477 "category_id": 8,478 "featured_link": null,479 "has_accepted_answer": false,480 "posters": [481 {482 "extras": "latest single",483 "description": "Original Poster, Most Recent Poster",484 "user": {485 "id": 81310,486 "username": "pikantrop",487 "name": "",488 "avatar_template": "/letter_avatar_proxy/v4/letter/p/b77776/{size}.png",489 "trust_level": 1490 }491 }492 ]493 },494 {495 "fancy_title": "Why facing “CUDA error: device-side assert triggered” while training LSTM model?",496 "id": 216698,497 "title": "Why facing \"CUDA error: device-side assert triggered\" while training LSTM model?",498 "slug": "why-facing-cuda-error-device-side-assert-triggered-while-training-lstm-model",499 "posts_count": 6,500 "reply_count": 4,501 "highest_post_number": 6,502 "image_url": null,503 "created_at": "2025-02-14T23:12:50.231Z",504 "last_posted_at": "2025-02-14T23:45:24.687Z",505 "bumped": true,506 "bumped_at": "2025-02-14T23:45:24.687Z",507 "archetype": "regular",508 "unseen": false,509 "pinned": false,510 "unpinned": null,511 "visible": true,512 "closed": false,513 "archived": false,514 "bookmarked": null,515 "liked": null,516 "tags_descriptions": {},517 "like_count": 0,518 "views": 63,519 "category_id": 8,520 "featured_link": null,521 "has_accepted_answer": false,522 "posters": [523 {524 "extras": "latest",525 "description": "Original Poster, Most Recent Poster",526 "user": {527 "id": 82698,528 "username": "Atharva_Mishra",529 "name": "Atharva Mishra",530 "avatar_template": "/user_avatar/discuss.pytorch.org/atharva_mishra/{size}/75666_2.png",531 "trust_level": 0532 }533 },534 {535 "extras": null,536 "description": "Frequent Poster",537 "user": {538 "id": 3534,539 "username": "ptrblck",540 "name": "",541 "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",542 "admin": true,543 "moderator": true,544 "trust_level": 2545 }546 }547 ]548 }549 ],550 "tags_descriptions": {},551 "fancy_title": "GRU for creating a simple “ones” counter",552 "id": 49433,553 "title": "GRU for creating a simple \"ones\" counter",554 "posts_count": 5,555 "created_at": "2019-07-02T05:24:15.637Z",556 "views": 616,557 "reply_count": 2,558 "like_count": 0,559 "last_posted_at": "2019-07-23T11:09:17.613Z",560 "visible": true,561 "closed": false,562 "archived": false,563 "has_summary": false,564 "archetype": "regular",565 "slug": "gru-for-creating-a-simple-ones-counter",566 "category_id": 8,567 "word_count": 655,568 "deleted_at": null,569 "user_id": 15900,570 "featured_link": null,571 "pinned_globally": false,572 "pinned_at": null,573 "pinned_until": null,574 "image_url": null,575 "slow_mode_seconds": 0,576 "draft": null,577 "draft_key": "topic_49433",578 "draft_sequence": null,579 "unpinned": null,580 "pinned": false,581 "current_post_number": 1,582 "highest_post_number": 5,583 "deleted_by": null,584 "actions_summary": [585 {586 "id": 4,587 "count": 0,588 "hidden": false,589 "can_act": false590 },591 {592 "id": 8,593 "count": 0,594 "hidden": false,595 "can_act": false596 },597 {598 "id": 10,599 "count": 0,600 "hidden": false,601 "can_act": false602 },603 {604 "id": 7,605 "count": 0,606 "hidden": false,607 "can_act": false608 }609 ],610 "chunk_size": 20,611 "bookmarked": false,612 "topic_timer": null,613 "message_bus_last_id": 0,614 "participant_count": 2,615 "show_read_indicator": false,616 "thumbnails": null,617 "slow_mode_enabled_until": null,618 "can_vote": false,619 "vote_count": 0,620 "user_voted": false,621 "discourse_zendesk_plugin_zendesk_id": null,622 "discourse_zendesk_plugin_zendesk_url": "https://your-url.zendesk.com/agent/tickets/",623 "details": {624 "can_edit": false,625 "notification_level": 1,626 "participants": [627 {628 "id": 15900,629 "username": "Anuj_Chopra",630 "name": "Anuj Chopra",631 "avatar_template": "/user_avatar/discuss.pytorch.org/anuj_chopra/{size}/9425_2.png",632 "post_count": 4,633 "primary_group_name": null,634 "flair_name": null,635 "flair_url": null,636 "flair_color": null,637 "flair_bg_color": null,638 "flair_group_id": null,639 "trust_level": 2640 },641 {642 "id": 1438,643 "username": "vdw",644 "name": "Chris",645 "avatar_template": "/user_avatar/discuss.pytorch.org/vdw/{size}/10074_2.png",646 "post_count": 1,647 "primary_group_name": null,648 "flair_name": null,649 "flair_url": null,650 "flair_color": null,651 "flair_bg_color": null,652 "flair_group_id": null,653 "trust_level": 2654 }655 ],656 "created_by": {657 "id": 15900,658 "username": "Anuj_Chopra",659 "name": "Anuj Chopra",660 "avatar_template": "/user_avatar/discuss.pytorch.org/anuj_chopra/{size}/9425_2.png"661 },662 "last_poster": {663 "id": 15900,664 "username": "Anuj_Chopra",665 "name": "Anuj Chopra",666 "avatar_template": "/user_avatar/discuss.pytorch.org/anuj_chopra/{size}/9425_2.png"667 }668 },669 "bookmarks": []670 },671 {672 "post_stream": {673 "posts": [674 {675 "id": 124905,676 "name": "Vivek",677 "username": "vivekstorm",678 "avatar_template": "/letter_avatar_proxy/v4/letter/v/fbc32d/{size}.png",679 "created_at": "2019-07-23T11:05:15.304Z",680 "cooked": "<p>How do I add histogram of weights and gradients of pre-trained ResNet in tensorboardX summary writer?</p>",681 "post_number": 1,682 "post_type": 1,683 "posts_count": 1,684 "updated_at": "2019-07-23T11:05:15.304Z",685 "reply_count": 0,686 "reply_to_post_number": null,687 "quote_count": 0,688 "incoming_link_count": 52,689 "reads": 18,690 "readers_count": 17,691 "score": 263.6,692 "yours": false,693 "topic_id": 51377,694 "topic_slug": "visualize-model-weights-and-gradients-in-tensorboardx",695 "display_username": "Vivek",696 "primary_group_name": null,697 "flair_name": null,698 "flair_url": null,699 "flair_bg_color": null,700 "flair_color": null,701 "flair_group_id": null,702 "badges_granted": [],703 "version": 1,704 "can_edit": false,705 "can_delete": false,706 "can_recover": false,707 "can_see_hidden_post": false,708 "can_wiki": false,709 "read": true,710 "user_title": null,711 "bookmarked": false,712 "actions_summary": [],713 "moderator": false,714 "admin": false,715 "staff": false,716 "user_id": 20721,717 "hidden": false,718 "trust_level": 1,719 "deleted_at": null,720 "user_deleted": false,721 "edit_reason": null,722 "can_view_edit_history": true,723 "wiki": false,724 "post_url": "/t/visualize-model-weights-and-gradients-in-tensorboardx/51377/1",725 "can_accept_answer": false,726 "can_unaccept_answer": false,727 "accepted_answer": false,728 "topic_accepted_answer": null,729 "can_vote": false730 }731 ],732 "stream": [733 124905734 ]735 },736 "timeline_lookup": [737 [738 1,739 2287740 ]741 ],742 "suggested_topics": [743 {744 "fancy_title": "Faster Vit Hierarchical Attention",745 "id": 214037,746 "title": "Faster Vit Hierarchical Attention",747 "slug": "faster-vit-hierarchical-attention",748 "posts_count": 1,749 "reply_count": 0,750 "highest_post_number": 1,751 "image_url": null,752 "created_at": "2024-12-10T08:36:29.626Z",753 "last_posted_at": "2024-12-10T08:36:29.684Z",754 "bumped": true,755 "bumped_at": "2024-12-10T08:36:29.684Z",756 "archetype": "regular",757 "unseen": false,758 "pinned": false,759 "unpinned": null,760 "visible": true,761 "closed": false,762 "archived": false,763 "bookmarked": null,764 "liked": null,765 "tags_descriptions": {},766 "like_count": 0,767 "views": 127,768 "category_id": 5,769 "featured_link": null,770 "has_accepted_answer": false,771 "posters": [772 {773 "extras": "latest single",774 "description": "Original Poster, Most Recent Poster",775 "user": {776 "id": 81424,777 "username": "hussainmir05",778 "name": "Hussain mir",779 "avatar_template": "/user_avatar/discuss.pytorch.org/hussainmir05/{size}/72721_2.png",780 "trust_level": 0781 }782 }783 ]784 },785 {786 "fancy_title": "Issue in the curve of training",787 "id": 214245,788 "title": "Issue in the curve of training",789 "slug": "issue-in-the-curve-of-training",790 "posts_count": 6,791 "reply_count": 4,792 "highest_post_number": 6,793 "image_url": "https://discuss.pytorch.org/uploads/default/optimized/3X/c/a/cacc24171efe3828c29ec1dabee719d95fec2ebb_2_1024x588.png",794 "created_at": "2024-12-15T15:23:43.751Z",795 "last_posted_at": "2024-12-15T21:16:13.480Z",796 "bumped": true,797 "bumped_at": "2024-12-15T21:16:13.480Z",798 "archetype": "regular",799 "unseen": false,800 "pinned": false,801 "unpinned": null,802 "visible": true,803 "closed": false,804 "archived": false,805 "bookmarked": null,806 "liked": null,807 "tags_descriptions": {},808 "like_count": 2,809 "views": 37,810 "category_id": 5,811 "featured_link": null,812 "has_accepted_answer": true,813 "posters": [814 {815 "extras": null,816 "description": "Original Poster",817 "user": {818 "id": 43052,819 "username": "samm",820 "name": "",821 "avatar_template": "/user_avatar/discuss.pytorch.org/samm/{size}/36169_2.png",822 "trust_level": 1823 }824 },825 {826 "extras": "latest",827 "description": "Most Recent Poster, Accepted Answer",828 "user": {829 "id": 3534,830 "username": "ptrblck",831 "name": "",832 "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",833 "admin": true,834 "moderator": true,835 "trust_level": 2836 }837 }838 ]839 },840 {841 "fancy_title": "Can i insert new layers in a resnet model without changing the names of original Renset layers names?",842 "id": 214407,843 "title": "Can i insert new layers in a resnet model without changing the names of original Renset layers names?",844 "slug": "can-i-insert-new-layers-in-a-resnet-model-without-changing-the-names-of-original-renset-layers-names",845 "posts_count": 4,846 "reply_count": 2,847 "highest_post_number": 4,848 "image_url": null,849 "created_at": "2024-12-19T14:11:59.198Z",850 "last_posted_at": "2024-12-31T16:53:38.669Z",851 "bumped": true,852 "bumped_at": "2024-12-31T16:53:38.669Z",853 "archetype": "regular",854 "unseen": false,855 "pinned": false,856 "unpinned": null,857 "visible": true,858 "closed": false,859 "archived": false,860 "bookmarked": null,861 "liked": null,862 "tags_descriptions": {},863 "like_count": 0,864 "views": 58,865 "category_id": 5,866 "featured_link": null,867 "has_accepted_answer": false,868 "posters": [869 {870 "extras": null,871 "description": "Original Poster",872 "user": {873 "id": 79205,874 "username": "Mayuresh",875 "name": "Mayuresh",876 "avatar_template": "/user_avatar/discuss.pytorch.org/mayuresh/{size}/72855_2.png",877 "trust_level": 1878 }879 },880 {881 "extras": "latest",882 "description": "Most Recent Poster",883 "user": {884 "id": 3534,885 "username": "ptrblck",886 "name": "",887 "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",888 "admin": true,889 "moderator": true,890 "trust_level": 2891 }892 }893 ]894 },895 {896 "fancy_title": "Unable to reproduce SegFormer code",897 "id": 214793,898 "title": "Unable to reproduce SegFormer code",899 "slug": "unable-to-reproduce-segformer-code",900 "posts_count": 3,901 "reply_count": 0,902 "highest_post_number": 3,903 "image_url": "https://discuss.pytorch.org/uploads/default/optimized/3X/b/9/b9d9dfcd8e2f738df063c1d3f52c668f835d503a_2_524x1024.jpeg",904 "created_at": "2024-12-30T16:05:01.707Z",905 "last_posted_at": "2025-01-01T03:06:51.549Z",906 "bumped": true,907 "bumped_at": "2025-01-01T03:06:51.549Z",908 "archetype": "regular",909 "unseen": false,910 "pinned": false,911 "unpinned": null,912 "visible": true,913 "closed": false,914 "archived": false,915 "bookmarked": null,916 "liked": null,917 "tags_descriptions": {},918 "like_count": 0,919 "views": 215,920 "category_id": 5,921 "featured_link": null,922 "has_accepted_answer": false,923 "posters": [924 {925 "extras": "latest",926 "description": "Original Poster, Most Recent Poster",927 "user": {928 "id": 80558,929 "username": "Rebantadey",930 "name": "",931 "avatar_template": "/letter_avatar_proxy/v4/letter/r/6f9a4e/{size}.png",932 "trust_level": 1933 }934 },935 {936 "extras": null,937 "description": "Frequent Poster",938 "user": {939 "id": 41396,940 "username": "soulitzer",941 "name": "",942 "avatar_template": "/letter_avatar_proxy/v4/letter/s/839c29/{size}.png",943 "trust_level": 2944 }945 }946 ]947 },948 {949 "fancy_title": "Faster RCNN maP not improving. Suggestions?",950 "id": 212523,951 "title": "Faster RCNN maP not improving. Suggestions?",952 "slug": "faster-rcnn-map-not-improving-suggestions",953 "posts_count": 1,954 "reply_count": 0,955 "highest_post_number": 1,956 "image_url": "https://discuss.pytorch.org/uploads/default/optimized/3X/c/d/cd182af74b27ee1f734e000202f7c724fa56a41f_2_1024x422.png",957 "created_at": "2024-11-04T22:21:03.523Z",958 "last_posted_at": "2024-11-04T22:21:03.586Z",959 "bumped": true,960 "bumped_at": "2024-11-04T22:24:08.335Z",961 "archetype": "regular",962 "unseen": false,963 "pinned": false,964 "unpinned": null,965 "visible": true,966 "closed": false,967 "archived": false,968 "bookmarked": null,969 "liked": null,970 "tags_descriptions": {},971 "like_count": 0,972 "views": 111,973 "category_id": 5,974 "featured_link": null,975 "has_accepted_answer": false,976 "posters": [977 {978 "extras": "latest single",979 "description": "Original Poster, Most Recent Poster",980 "user": {981 "id": 80684,982 "username": "shanalikhan",983 "name": "Shan Khan",984 "avatar_template": "/user_avatar/discuss.pytorch.org/shanalikhan/{size}/73764_2.png",985 "trust_level": 1986 }987 }988 ]989 }990 ],991 "tags_descriptions": {},992 "fancy_title": "Visualize model weights and gradients in tensorboardX",993 "id": 51377,994 "title": "Visualize model weights and gradients in tensorboardX",995 "posts_count": 1,996 "created_at": "2019-07-23T11:05:15.266Z",997 "views": 424,998 "reply_count": 0,999 "like_count": 0,1000 "last_posted_at": "2019-07-23T11:05:15.304Z",1001 "visible": true,1002 "closed": false,1003 "archived": false,1004 "has_summary": false,1005 "archetype": "regular",1006 "slug": "visualize-model-weights-and-gradients-in-tensorboardx",1007 "category_id": 5,1008 "word_count": 17,1009 "deleted_at": null,1010 "user_id": 20721,1011 "featured_link": null,1012 "pinned_globally": false,1013 "pinned_at": null,1014 "pinned_until": null,1015 "image_url": null,1016 "slow_mode_seconds": 0,1017 "draft": null,1018 "draft_key": "topic_51377",1019 "draft_sequence": null,1020 "unpinned": null,1021 "pinned": false,1022 "current_post_number": 1,1023 "highest_post_number": 1,1024 "deleted_by": null,1025 "actions_summary": [1026 {1027 "id": 4,1028 "count": 0,1029 "hidden": false,1030 "can_act": false1031 },1032 {1033 "id": 8,1034 "count": 0,1035 "hidden": false,1036 "can_act": false1037 },1038 {1039 "id": 10,1040 "count": 0,1041 "hidden": false,1042 "can_act": false1043 },1044 {1045 "id": 7,1046 "count": 0,1047 "hidden": false,1048 "can_act": false1049 }1050 ],1051 "chunk_size": 20,1052 "bookmarked": false,1053 "topic_timer": null,1054 "message_bus_last_id": 0,1055 "participant_count": 1,1056 "show_read_indicator": false,1057 "thumbnails": null,1058 "slow_mode_enabled_until": null,1059 "can_vote": false,1060 "vote_count": 0,1061 "user_voted": false,1062 "discourse_zendesk_plugin_zendesk_id": null,1063 "discourse_zendesk_plugin_zendesk_url": "https://your-url.zendesk.com/agent/tickets/",1064 "details": {1065 "can_edit": false,1066 "notification_level": 1,1067 "participants": [1068 {1069 "id": 20721,1070 "username": "vivekstorm",1071 "name": "Vivek",1072 "avatar_template": "/letter_avatar_proxy/v4/letter/v/fbc32d/{size}.png",1073 "post_count": 1,1074 "primary_group_name": null,1075 "flair_name": null,1076 "flair_url": null,1077 "flair_color": null,1078 "flair_bg_color": null,1079 "flair_group_id": null,1080 "trust_level": 11081 }1082 ],1083 "created_by": {1084 "id": 20721,1085 "username": "vivekstorm",1086 "name": "Vivek",1087 "avatar_template": "/letter_avatar_proxy/v4/letter/v/fbc32d/{size}.png"1088 },1089 "last_poster": {1090 "id": 20721,1091 "username": "vivekstorm",1092 "name": "Vivek",1093 "avatar_template": "/letter_avatar_proxy/v4/letter/v/fbc32d/{size}.png"1094 }1095 },1096 "bookmarks": []1097 },1098 {1099 "post_stream": {1100 "posts": [1101 {1102 "id": 124899,1103 "name": "",1104 "username": "pitty",1105 "avatar_template": "/user_avatar/discuss.pytorch.org/pitty/{size}/13171_2.png",1106 "created_at": "2019-07-23T10:53:18.864Z",1107 "cooked": "<p>Hello!</p>\n<p>I am trying to run the following code: <a href=\"https://github.com/Sirius79/acGAN/blob/master/train.py\" rel=\"nofollow noopener\">https://github.com/Sirius79/acGAN/blob/master/train.py</a> for more epochs and I get CUDA out of memory error after around 60.</p>\n<p>I am a really noob in Torch and I did not write that code. After researching a bit I think some tensors are not allocated the way they should be so the memory usage increases with each iteration, but I cannot find the problem myself (tried, but it takes 3 hours to get to the error so changing every line of code in every possible way does not work).</p>\n<p>Any help would be greatly appreciated.</p>\n<p>Thanks</p>",1108 "post_number": 1,1109 "post_type": 1,1110 "posts_count": 1,1111 "updated_at": "2019-07-23T10:53:18.864Z",1112 "reply_count": 0,1113 "reply_to_post_number": null,1114 "quote_count": 0,1115 "incoming_link_count": 14,1116 "reads": 7,1117 "readers_count": 6,1118 "score": 71.4,1119 "yours": false,1120 "topic_id": 51375,1121 "topic_slug": "acgan-cuda-out-of-memory",1122 "display_username": "",1123 "primary_group_name": null,1124 "flair_name": null,1125 "flair_url": null,1126 "flair_bg_color": null,1127 "flair_color": null,1128 "flair_group_id": null,1129 "badges_granted": [],1130 "version": 1,1131 "can_edit": false,1132 "can_delete": false,1133 "can_recover": false,1134 "can_see_hidden_post": false,1135 "can_wiki": false,1136 "link_counts": [1137 {1138 "url": "https://github.com/Sirius79/acGAN/blob/master/train.py",1139 "internal": false,1140 "reflection": false,1141 "title": "acGAN/train.py at master · Sirius79/acGAN · GitHub",1142 "clicks": 41143 }1144 ],1145 "read": true,1146 "user_title": null,1147 "bookmarked": false,1148 "actions_summary": [],1149 "moderator": false,1150 "admin": false,1151 "staff": false,1152 "user_id": 20886,1153 "hidden": false,1154 "trust_level": 1,1155 "deleted_at": null,1156 "user_deleted": false,1157 "edit_reason": null,1158 "can_view_edit_history": true,1159 "wiki": false,1160 "post_url": "/t/acgan-cuda-out-of-memory/51375/1",1161 "can_accept_answer": false,1162 "can_unaccept_answer": false,1163 "accepted_answer": false,1164 "topic_accepted_answer": null,1165 "can_vote": false1166 }1167 ],1168 "stream": [1169 1248991170 ]1171 },1172 "timeline_lookup": [1173 [1174 1,1175 22871176 ]1177 ],1178 "suggested_topics": [1179 {1180 "fancy_title": "Restrict FCN output to valid convolutions",1181 "id": 218022,1182 "title": "Restrict FCN output to valid convolutions",1183 "slug": "restrict-fcn-output-to-valid-convolutions",1184 "posts_count": 1,1185 "reply_count": 0,1186 "highest_post_number": 1,1187 "image_url": null,1188 "created_at": "2025-03-19T10:24:29.118Z",1189 "last_posted_at": "2025-03-19T10:24:29.158Z",1190 "bumped": true,1191 "bumped_at": "2025-03-19T10:24:29.158Z",1192 "archetype": "regular",1193 "unseen": false,1194 "pinned": false,1195 "unpinned": null,1196 "visible": true,1197 "closed": false,1198 "archived": false,1199 "bookmarked": null,1200 "liked": null,