{
  "id": 66421,
  "title": "Has tensorflow.keras changed BCE computation?",
  "url": "/competitions/rsna-pneumonia-detection-challenge/discussion/66421",
  "author_name": "",
  "post_date": "2018-09-21T11:27:11.972328100Z",
  "votes": 6,
  "comment_count": 3,
  "views": 0,
  "content": "<p>I am seeing dramatically different numbers reported for binary cross-entropy losses from Kaggle kernels (previously around 0.06, now around 1.0), but other reported metrics (such as IoU) are in the same range as before. It would appear that the definition has changed.  (Given the size of the change, with my batch size of 16, maybe it is now reporting a sum per batch rather than an average?)  Have others experienced this?  Does anyone know about the change?</p>",
  "messages": [
    {
      "id": "391186",
      "postDate": "09/21/2018 11:27:11",
      "content": "<p>I am seeing dramatically different numbers reported for binary cross-entropy losses from Kaggle kernels (previously around 0.06, now around 1.0), but other reported metrics (such as IoU) are in the same range as before. It would appear that the definition has changed.  (Given the size of the change, with my batch size of 16, maybe it is now reporting a sum per batch rather than an average?)  Have others experienced this?  Does anyone know about the change?</p>",
      "rawMarkdown": "I am seeing dramatically different numbers reported for binary cross-entropy losses from Kaggle kernels (previously around 0.06, now around 1.0), but other reported metrics (such as IoU) are in the same range as before. It would appear that the definition has changed.  (Given the size of the change, with my batch size of 16, maybe it is now reporting a sum per batch rather than an average?)  Have others experienced this?  Does anyone know about the change?",
      "votes": null
    },
    {
      "id": "391274",
      "postDate": "09/21/2018 13:47:41",
      "content": "<p>Quick test suggests that doubling the batch size causes the loss to roughly double, so I think my guess is right about what the change is.</p>",
      "rawMarkdown": "Quick test suggests that doubling the batch size causes the loss to roughly double, so I think my guess is right about what the change is.",
      "votes": null
    },
    {
      "id": "398848",
      "postDate": "10/04/2018 17:07:55",
      "content": "<p>So confusing. Seems like sometimes it divides by batch size and sometimes it doesn't.</p>",
      "rawMarkdown": "So confusing. Seems like sometimes it divides by batch size and sometimes it doesn't.",
      "votes": null
    },
    {
      "id": "398981",
      "postDate": "10/04/2018 22:52:06",
      "content": "<p>You mean like K sometimes works with Multi-GPU and sometimes doesn't?  I rolled back to 2.1.3 which seems to be the most stable version before large changes started happening to Keras to fold it into TF better.  Just my opinion.  I'm sure better informed persons have better ones.</p>",
      "rawMarkdown": "You mean like K sometimes works with Multi-GPU and sometimes doesn't?  I rolled back to 2.1.3 which seems to be the most stable version before large changes started happening to Keras to fold it into TF better.  Just my opinion.  I'm sure better informed persons have better ones.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 391274,
      "author_name": "aharless",
      "author_url": "",
      "post_date": "09/21/2018 13:47:41",
      "content": "<p>Quick test suggests that doubling the batch size causes the loss to roughly double, so I think my guess is right about what the change is.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 398848,
      "author_name": "aharless",
      "author_url": "",
      "post_date": "10/04/2018 17:07:55",
      "content": "<p>So confusing. Seems like sometimes it divides by batch size and sometimes it doesn't.</p>",
      "votes": null,
      "replies": [
        {
          "id": 398981,
          "author_name": "drsxr1",
          "author_url": "",
          "post_date": "10/04/2018 22:52:06",
          "content": "<p>You mean like K sometimes works with Multi-GPU and sometimes doesn't?  I rolled back to 2.1.3 which seems to be the most stable version before large changes started happening to Keras to fold it into TF better.  Just my opinion.  I'm sure better informed persons have better ones.</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "391186": "I am seeing dramatically different numbers reported for binary cross-entropy losses from Kaggle kernels (previously around 0.06, now around 1.0), but other reported metrics (such as IoU) are in the same range as before. It would appear that the definition has changed.  (Given the size of the change, with my batch size of 16, maybe it is now reporting a sum per batch rather than an average?)  Have others experienced this?  Does anyone know about the change?",
    "391274": "Quick test suggests that doubling the batch size causes the loss to roughly double, so I think my guess is right about what the change is.",
    "398848": "So confusing. Seems like sometimes it divides by batch size and sometimes it doesn't.",
    "398981": "You mean like K sometimes works with Multi-GPU and sometimes doesn't?  I rolled back to 2.1.3 which seems to be the most stable version before large changes started happening to Keras to fold it into TF better.  Just my opinion.  I'm sure better informed persons have better ones."
  },
  "source": "meta"
}