Closed andrewcheng2016 closed 4 months ago
Hi, thank you so much for this issue. This is the updated version of CAFormerS18 from keras_cv_attention_models, but if you reshape the feature output, just remind to consider about the feature shape that still contains the meaning.
Thank you for your reply. I mistakenly installed the latest version of keras_cv_attention_models, which caused the problem. It is solved by reinstalling keras_cv_attention_models==1.3.9.
In def build model() from model.py, I found the shapes of the CAFormerS18 may be incompatible. `def build_model(img_size = 256, num_classes = 1): backbone = caformer.CAFormerS18(input_shape=(256, 256, 3), pretrained="imagenet", num_classes = 0)
` Hence, I changed 'stack4_block3_mlp_Dense_1' to 'tf.reshape_51' and 'stack3_block9_mlp_Dense_1' to 'stack3_downsample_conv' and the problem works now. However, I tried to train the model for kvasir-seg dataset and the training stopped in Epoch 2.
I just changed the first two layers' names, and the rest remain unchanged. May you give me some guide? Thank you.