keras-team / keras-io

Keras documentation, hosted live at keras.io
Apache License 2.0
2.78k stars 2.04k forks source link

[mobile vit] if input not equals to (n, 256, 256, 3) #838

Closed yc0619 closed 1 year ago

yc0619 commented 2 years ago

my input of customize dataset is (n, 600, 600, 3), i have tried resize before input to the modell, it works. But i still wonder, how can i input an arbitrary size image in mobile vit.

I would like to put an spp before classification head. But how can i solve the following exception by reshape layer? I use tf2.7.0 on mac.

ValueError: Exception encountered when calling layer "reshape" (type Reshape). total size of new array must be unchanged, input_shape = [75, 75, 64], output_shape = [4, 1406, 64]

pcoet commented 1 year ago

Hi @yc0619, thanks for reaching out. The issue backlog is not the best place for support requests. Can you repost this to one of the forums below? That way your question will have more visibility.

Thanks!