{
  "id": 29719,
  "title": "Mean subtraction with batch_norm?",
  "url": "/competitions/cifar-10/discussion/29719",
  "author_name": "DavidBrowne",
  "post_date": "2017-03-07T12:30:37.954000",
  "votes": 0,
  "comment_count": 0,
  "views": 0,
  "content": "<p>Hi,</p>\n\n<p>I am new at image recognition and wondering with the cifar 10 data set, what preprocessing is most commonly used?</p>\n\n<p>I know to scale pixels between 0-1 by dividing by 255.\nDo I subtract the mean and divide by the variance of each pixel in the data set?\nI have noticed that in tensorflow, batch normalization being used, do I still do mean subtraction with this?</p>\n\n<p>Also if doing mean subtraction with variance division, is it just a case of:</p>\n\n<p>X = cifar 10 without labels</p>\n\n<p>X -= np.mean(X , axis=0)</p>\n\n<p>X /= np.std(X, axis=0)</p>\n\n<p>Sorry if these are basic questions, I just want to get a better understanding for the preprocessing of images.</p>\n\n<p>Thanks for your help</p>\n\n<p>Dave</p>",
  "messages": [
    {
      "id": 165864,
      "postDate": "2017-03-07T12:30:37.953Z",
      "content": "<p>Hi,</p>\n\n<p>I am new at image recognition and wondering with the cifar 10 data set, what preprocessing is most commonly used?</p>\n\n<p>I know to scale pixels between 0-1 by dividing by 255.\nDo I subtract the mean and divide by the variance of each pixel in the data set?\nI have noticed that in tensorflow, batch normalization being used, do I still do mean subtraction with this?</p>\n\n<p>Also if doing mean subtraction with variance division, is it just a case of:</p>\n\n<p>X = cifar 10 without labels</p>\n\n<p>X -= np.mean(X , axis=0)</p>\n\n<p>X /= np.std(X, axis=0)</p>\n\n<p>Sorry if these are basic questions, I just want to get a better understanding for the preprocessing of images.</p>\n\n<p>Thanks for your help</p>\n\n<p>Dave</p>",
      "rawMarkdown": "Hi,\n\nI am new at image recognition and wondering with the cifar 10 data set, what preprocessing is most commonly used?\n\nI know to scale pixels between 0-1 by dividing by 255.\nDo I subtract the mean and divide by the variance of each pixel in the data set?\nI have noticed that in tensorflow, batch normalization being used, do I still do mean subtraction with this?\n\nAlso if doing mean subtraction with variance division, is it just a case of:\n\nX = cifar 10 without labels\n\nX -= np.mean(X , axis=0)\n\nX /= np.std(X, axis=0)\n\nSorry if these are basic questions, I just want to get a better understanding for the preprocessing of images.\n\nThanks for your help\n\nDave"
    }
  ],
  "comments": [],
  "raw_markdown_by_id": {
    "165864": "Hi,\n\nI am new at image recognition and wondering with the cifar 10 data set, what preprocessing is most commonly used?\n\nI know to scale pixels between 0-1 by dividing by 255.\nDo I subtract the mean and divide by the variance of each pixel in the data set?\nI have noticed that in tensorflow, batch normalization being used, do I still do mean subtraction with this?\n\nAlso if doing mean subtraction with variance division, is it just a case of:\n\nX = cifar 10 without labels\n\nX -= np.mean(X , axis=0)\n\nX /= np.std(X, axis=0)\n\nSorry if these are basic questions, I just want to get a better understanding for the preprocessing of images.\n\nThanks for your help\n\nDave"
  }
}