{
  "id": 210973,
  "title": "output image of ImageDataGenerator",
  "url": "/competitions/cassava-leaf-disease-classification/discussion/210973",
  "author_name": "",
  "post_date": "2021-01-13T07:21:10.414957200Z",
  "votes": 2,
  "comment_count": 5,
  "views": 0,
  "content": "<p>Hello the output image from my ImageDataGenerator looks like this:<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F5130427%2Fbe0019ffea652a38c5a1d6b16e747325%2FUntitled.png?generation=1610522347214709&amp;alt=media\" alt=\"\"></p>\n<p>Q.1- I am using preprocessing_function for EfficientNet. I want to know if this is the correct type of input that EfficientNet takes or I need to change something?<br>\nQ.2-Is there a way by which I can keep the images as original after it has been passed through the ImageDataGenerator?</p>",
  "messages": [
    {
      "id": "1151194",
      "postDate": "01/13/2021 07:21:10",
      "content": "<p>Hello the output image from my ImageDataGenerator looks like this:<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F5130427%2Fbe0019ffea652a38c5a1d6b16e747325%2FUntitled.png?generation=1610522347214709&amp;alt=media\" alt=\"\"></p>\n<p>Q.1- I am using preprocessing_function for EfficientNet. I want to know if this is the correct type of input that EfficientNet takes or I need to change something?<br>\nQ.2-Is there a way by which I can keep the images as original after it has been passed through the ImageDataGenerator?</p>",
      "rawMarkdown": "Hello the output image from my ImageDataGenerator looks like this:![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F5130427%2Fbe0019ffea652a38c5a1d6b16e747325%2FUntitled.png?generation=1610522347214709&alt=media)\n\nQ.1- I am using preprocessing_function for EfficientNet. I want to know if this is the correct type of input that EfficientNet takes or I need to change something?\nQ.2-Is there a way by which I can keep the images as original after it has been passed through the ImageDataGenerator?",
      "votes": null
    },
    {
      "id": "1151475",
      "postDate": "01/13/2021 10:58:28",
      "content": "<p><a href=\"https://www.kaggle.com/sarangbhatnagar\" target=\"_blank\">@sarangbhatnagar</a>, hi, I believe you might want to divide image by 255, if not done already.<br>\nHave recently faced this problem, where dividing by 255 helped. <br>\nKindly do reply if this works.<br>\nThanks</p>",
      "rawMarkdown": "sarangbhatnagar, hi, I believe you might want to divide image by 255, if not done already.\nHave recently faced this problem, where dividing by 255 helped. \nKindly do reply if this works.\nThanks",
      "votes": null
    },
    {
      "id": "1151945",
      "postDate": "01/13/2021 16:53:36",
      "content": "<p>Hello thanks for the response it worked :)<br>\nI am just wondering which input goes in the CNN network? when the image goes in the input does it divide automatically by 255.<br>\nThanks</p>",
      "rawMarkdown": "Hello thanks for the response it worked :)\nI am just wondering which input goes in the CNN network? when the image goes in the input does it divide automatically by 255.\nThanks",
      "votes": null
    },
    {
      "id": "1152005",
      "postDate": "01/13/2021 17:38:48",
      "content": "<p><a href=\"https://www.kaggle.com/sarangbhatnagar\" target=\"_blank\">@sarangbhatnagar</a>, I  do not believe it automatically divides by 255 until  we have used a Rescalling layer in our network, or mentioned something in the pre processing function.</p>\n<p>Any how from past experiences I can tell  90 % of such problems arises because we forget to standardize our data and gradient explodes!!  and model learns nothing,</p>\n<p>A better idea is you can use Batch norm layer after input layer that pretty much also handles this case<br>\nif you want do not want to use any kind of rescalling. </p>\n<p>I am glad the advice helped, happy learning!</p>",
      "rawMarkdown": "sarangbhatnagar, I  do not believe it automatically divides by 255 until  we have used a Rescalling layer in our network, or mentioned something in the pre processing function.\n\nAny how from past experiences I can tell  90 % of such problems arises because we forget to standardize our data and gradient explodes!!  and model learns nothing,\n\n A better idea is you can use Batch norm layer after input layer that pretty much also handles this case\nif you want do not want to use any kind of rescalling. \n\n\nI am glad the advice helped, happy learning!",
      "votes": null
    },
    {
      "id": "1152480",
      "postDate": "01/14/2021 07:45:06",
      "content": "<p><a href=\"https://www.kaggle.com/vanvalkenberg\" target=\"_blank\">@vanvalkenberg</a> okay. but a lot of images are almost white(whiter than the image that I have posted here) if it doesnt do any transformation on the input then I am not sure how the network is learning on them and giving 80 percent accuracy. <br>\nI believe that fit_generator funtion might be doing something but I am not able to find anything in the documentation. If you find anything do let me know.<br>\nThank you</p>",
      "rawMarkdown": "vanvalkenberg okay. but a lot of images are almost white(whiter than the image that I have posted here) if it doesnt do any transformation on the input then I am not sure how the network is learning on them and giving 80 percent accuracy. \nI believe that fit_generator funtion might be doing something but I am not able to find anything in the documentation. If you find anything do let me know.\nThank you",
      "votes": null
    },
    {
      "id": "1152485",
      "postDate": "01/14/2021 07:51:52",
      "content": "<p><a href=\"https://www.kaggle.com/sarangbhatnagar\" target=\"_blank\">@sarangbhatnagar</a> sure.</p>",
      "rawMarkdown": "sarangbhatnagar sure.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1151475,
      "author_name": "vanvalkenberg",
      "author_url": "",
      "post_date": "01/13/2021 10:58:28",
      "content": "<p><a href=\"https://www.kaggle.com/sarangbhatnagar\" target=\"_blank\">@sarangbhatnagar</a>, hi, I believe you might want to divide image by 255, if not done already.<br>\nHave recently faced this problem, where dividing by 255 helped. <br>\nKindly do reply if this works.<br>\nThanks</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1151945,
      "author_name": "sarangbhatnagar",
      "author_url": "",
      "post_date": "01/13/2021 16:53:36",
      "content": "<p>Hello thanks for the response it worked :)<br>\nI am just wondering which input goes in the CNN network? when the image goes in the input does it divide automatically by 255.<br>\nThanks</p>",
      "votes": null,
      "replies": [
        {
          "id": 1152005,
          "author_name": "vanvalkenberg",
          "author_url": "",
          "post_date": "01/13/2021 17:38:48",
          "content": "<p><a href=\"https://www.kaggle.com/sarangbhatnagar\" target=\"_blank\">@sarangbhatnagar</a>, I  do not believe it automatically divides by 255 until  we have used a Rescalling layer in our network, or mentioned something in the pre processing function.</p>\n<p>Any how from past experiences I can tell  90 % of such problems arises because we forget to standardize our data and gradient explodes!!  and model learns nothing,</p>\n<p>A better idea is you can use Batch norm layer after input layer that pretty much also handles this case<br>\nif you want do not want to use any kind of rescalling. </p>\n<p>I am glad the advice helped, happy learning!</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 1152480,
      "author_name": "sarangbhatnagar",
      "author_url": "",
      "post_date": "01/14/2021 07:45:06",
      "content": "<p><a href=\"https://www.kaggle.com/vanvalkenberg\" target=\"_blank\">@vanvalkenberg</a> okay. but a lot of images are almost white(whiter than the image that I have posted here) if it doesnt do any transformation on the input then I am not sure how the network is learning on them and giving 80 percent accuracy. <br>\nI believe that fit_generator funtion might be doing something but I am not able to find anything in the documentation. If you find anything do let me know.<br>\nThank you</p>",
      "votes": null,
      "replies": [
        {
          "id": 1152485,
          "author_name": "vanvalkenberg",
          "author_url": "",
          "post_date": "01/14/2021 07:51:52",
          "content": "<p><a href=\"https://www.kaggle.com/sarangbhatnagar\" target=\"_blank\">@sarangbhatnagar</a> sure.</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "1151194": "Hello the output image from my ImageDataGenerator looks like this:![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F5130427%2Fbe0019ffea652a38c5a1d6b16e747325%2FUntitled.png?generation=1610522347214709&alt=media)\n\nQ.1- I am using preprocessing_function for EfficientNet. I want to know if this is the correct type of input that EfficientNet takes or I need to change something?\nQ.2-Is there a way by which I can keep the images as original after it has been passed through the ImageDataGenerator?",
    "1151475": "sarangbhatnagar, hi, I believe you might want to divide image by 255, if not done already.\nHave recently faced this problem, where dividing by 255 helped. \nKindly do reply if this works.\nThanks",
    "1151945": "Hello thanks for the response it worked :)\nI am just wondering which input goes in the CNN network? when the image goes in the input does it divide automatically by 255.\nThanks",
    "1152005": "sarangbhatnagar, I  do not believe it automatically divides by 255 until  we have used a Rescalling layer in our network, or mentioned something in the pre processing function.\n\nAny how from past experiences I can tell  90 % of such problems arises because we forget to standardize our data and gradient explodes!!  and model learns nothing,\n\n A better idea is you can use Batch norm layer after input layer that pretty much also handles this case\nif you want do not want to use any kind of rescalling. \n\n\nI am glad the advice helped, happy learning!",
    "1152480": "vanvalkenberg okay. but a lot of images are almost white(whiter than the image that I have posted here) if it doesnt do any transformation on the input then I am not sure how the network is learning on them and giving 80 percent accuracy. \nI believe that fit_generator funtion might be doing something but I am not able to find anything in the documentation. If you find anything do let me know.\nThank you",
    "1152485": "sarangbhatnagar sure."
  },
  "source": "meta"
}