qubvel / efficientnet

Implementation of EfficientNet model. Keras and TensorFlow Keras.
https://arxiv.org/abs/1905.11946
Apache License 2.0
2.07k stars 472 forks source link

I want to use `input_shape=(28, 28, 3)` #129

Closed minji-o-j closed 4 years ago

minji-o-j commented 4 years ago

I wrote a code like this

model = EfficientNetB3(weights='imagenet', input_shape = (28,28,3), include_top=False)

but

ValueError: Input size must be at least 32x32; got `input_shape=(28, 28, 3)`

this error occured…

I found some code that used input_shape = (28,28,3), and in keras documentation, they explict only: _input_shape: Optional shape tuple, only to be specified if includetop is False. It should have exactly 3 inputs channels.

How can I fix it? Or... scale up is the only way to solve the problem?

I use 2 computers and each version is image image

qubvel commented 4 years ago

We have five downsampling operations, so minimum size of input image for this architecture is 2^5 = 32

P.S. You can pad image