3

I am using a EfficientNet B0 from keras application.

tf.keras.applications.EfficientNetB0(include_top=True,weights=None,input_tensor=None, input_shape=(224, 224, 6), pooling=None,classes=5,classifier_activation="softmax")

Keras thereby normalizes the input to (0,1). I found the following line in the keras code:

x = layers.Rescaling(1. / 255.)(x)

Now I do not want to to rescale the input. As input I want to use the original image, because I work with a coral edgetpu board. This board only works fast with int8. I just want to remove the line above. I could copy the code from keras in my project. But then it doesn't work anymore when I use a different version of Tensorflow. Does anyone have an idea?

I am using Tensorflow 2.4

  • You could just multiply your inputs by 255 – SergioGM Jan 02 '21 at 09:03
  • Thanks for the answer. But I use training aware quantization. And the Rescale Layer is not supported with training aware quantization. I tried to use quantization after the training but the performance was bad. – Clemens Huber Jan 02 '21 at 18:47

0 Answers0