mobilenet_v2_keras icon indicating copy to clipboard operation
mobilenet_v2_keras copied to clipboard

Hi, this is more of a question concerning your preferences for preprocess_input

Open RadEdje opened this issue 5 years ago • 1 comments

Hi, I'm looking at your code and comparing it to the usual way of preprocessing numpy arrays into formats for training with Keras. Is there any particular reason why you wrote your own preprocessing code to convert the RGB values from [0, 255] to [-1, 1]?

Why not just use the built in keras.api of

imagenet_utils.preprocess_input()?

I'm trying both. It seems with the imagenet_utils.preprocess_input(), my model is not converging as well but with your

x /= 128. x -= 1. return x.astype(np.float32)

it is converging.

Is it a bug with imagenet_utils.preprocess_input()? which is why you hard coded your own way to preprocess the numpy array?

thanks again.

RadEdje avatar Apr 06 '19 12:04 RadEdje

I've encounter the same problem with you. I am doubting that the preprocessing step is a crucial step for training.

leviethung2103 avatar Apr 23 '20 06:04 leviethung2103