{
  "id": 123417,
  "title": "RAM Usage -Small but important point",
  "url": "/competitions/bengaliai-cv19/discussion/123417",
  "author_name": "Nirjhar Roy",
  "post_date": "2019-12-27T14:24:54.332000",
  "votes": 9,
  "comment_count": 0,
  "views": 0,
  "content": "<p>If you are seeing that RAM is increasing steadily during  each epoch while training , please check if you have the following line in your code \n<code>running_loss += loss1+loss2+loss3</code>\nHere , we dont want the complete loss tensor , we just want the scalar value of the loss , therefore replacing this line with the below helps . \n<code>running_loss += loss1.item()+loss2.item()+loss3.item()</code></p>\n\n<p>Note : (loss1+loss2+loss3).backward() would remain as is .</p>",
  "messages": [
    {
      "id": 704473,
      "postDate": "2019-12-27T14:24:54.333Z",
      "content": "<p>If you are seeing that RAM is increasing steadily during  each epoch while training , please check if you have the following line in your code \n<code>running_loss += loss1+loss2+loss3</code>\nHere , we dont want the complete loss tensor , we just want the scalar value of the loss , therefore replacing this line with the below helps . \n<code>running_loss += loss1.item()+loss2.item()+loss3.item()</code></p>\n\n<p>Note : (loss1+loss2+loss3).backward() would remain as is .</p>",
      "rawMarkdown": "If you are seeing that RAM is increasing steadily during  each epoch while training , please check if you have the following line in your code \n`running_loss += loss1+loss2+loss3`\nHere , we dont want the complete loss tensor , we just want the scalar value of the loss , therefore replacing this line with the below helps . \n`running_loss += loss1.item()+loss2.item()+loss3.item()`\n\nNote : (loss1+loss2+loss3).backward() would remain as is .",
      "votes": 8
    }
  ],
  "comments": [],
  "raw_markdown_by_id": {
    "704473": "If you are seeing that RAM is increasing steadily during  each epoch while training , please check if you have the following line in your code \n`running_loss += loss1+loss2+loss3`\nHere , we dont want the complete loss tensor , we just want the scalar value of the loss , therefore replacing this line with the below helps . \n`running_loss += loss1.item()+loss2.item()+loss3.item()`\n\nNote : (loss1+loss2+loss3).backward() would remain as is ."
  }
}