Giter Site home page Giter Site logo

Comments (6)

liuzhuang13 avatar liuzhuang13 commented on August 9, 2024

Hi @yuffon I think we just subtract the training means and stds in all testing, this is standard in machine learning.

from densenet.

yuffon avatar yuffon commented on August 9, 2024

Hi @yuffon I think we just subtract the training means and stds in all testing, this is standard in machine learning.

Yes, this is common in ML. What if the input image is not from the 10 categories in cifar10 dataset?
If I want to do transfer learning or other tasks, how should I preprocess the data?
I think it is more convenient with per image standardization.
So I replaced the whole-batch standardization with per image standardization, the acc doesn't converge, untill that I add an BN layer without scale and shift variables at the start point of the densenet. I have not checked the final accuracy results in different scenarios.

from densenet.

liuzhuang13 avatar liuzhuang13 commented on August 9, 2024

I don't think one should preprocess the images by its own mean and stds, that causes different input to be changed by different amounts.

CIFAR is not a good dataset to transfer from, I think if you do transfer learning it's better to start with ImageNet models. In this case, you still subtract imageNet training data's mean and stds.

from densenet.

yuffon avatar yuffon commented on August 9, 2024

In TensorFlow's official tutorial Resnet repository, they use per image standardization.
https://github.com/tensorflow/models/tree/master/official/resnet

from densenet.

yuffon avatar yuffon commented on August 9, 2024

I don't think one should preprocess the images by its own mean and stds, that causes different input to be changed by different amounts.

CIFAR is not a good dataset to transfer from, I think if you do transfer learning it's better to start with ImageNet models. In this case, you still subtract imageNet training data's mean and stds.

If I make a new network that trained on cifar10, but I want to test the model on image out of the cifar10 dataset and observe the network behavior on the out-of-distribution data. How should I normalize the data?

from densenet.

liuzhuang13 avatar liuzhuang13 commented on August 9, 2024

I think the common practice is to just normalize the data as the way it is normalized during training (and using the training stats).

from densenet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.