简体   繁体   中英

Is image rescaling between 0-255 needed for transfer learning

I am working on a classification task using transfer learning. I am using ResNet50 and weights from ImageNet.

My_model = (ResNet50( include_top=False, weights='imagenet', input_tensor=None,
    input_shape=(img_height, img_width, 3),pooling=None))

I didn't rescale my input images between 0-255 but my result is quite good (acc: 93.25%). So my question is do I need to rescale images between 0-255? Do you think my result is wrong without rescaling between 0-255?

Thank you.

No basically your result is not wrong. to give a clue on that, we standardize the pixels values to a range between (0 and 1) just to avoid resulting big values during the calculus in the forward propagation z = w*x + b and then the backward propagation.

Why we do that?

I develop, the optimization algorithm is definitely dependent on the result of the backward prop, so when we start updating our optimization algo with big values of weights/bias, then we need then a lot of epochs to reach the global minimum.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM