Hello, thanks for implementing this model. I'm having the following error when I try to instantiate a SegFormer, following the example in the repository. Any ideas how to fix it?
model = SegFormer_B3(input_shape = (224, 224, 3), num_classes = 19)
File D:\marcel\testes_diversos\notebook_atual\segformer_tf\models\segformer.py:93 in SegFormer_B3
x = MixVisionTransformer(
File D:\b3\envs\gdal_env\lib\site-packages\keras\src\utils\traceback_utils.py:123 in error_handler
raise e.with_traceback(filtered_tb) from None
File D:\marcel\testes_diversos\notebook_atual\segformer_tf\models\modules.py:266 in call
x = self.call_features(x)
File D:\marcel\testes_diversos\notebook_atual\segformer_tf\models\modules.py:234 in call_features
x = blk(x, H, W)
File D:\marcel\testes_diversos\notebook_atual\segformer_tf\models\modules.py:89 in call
x = x + self.drop_path(self.attn(self.norm1(x), H, W))
RuntimeError: Exception encountered when calling MixVisionTransformer.call().
Could not automatically infer the output shape / dtype of 'mix_vision_transformer_2' (of type MixVisionTransformer). Either the `MixVisionTransformer.call()` method is incorrect, or you need to implement the `MixVisionTransformer.compute_output_spec() / compute_output_shape()` method. Error encountered:
Exception encountered when calling Layer.call().
Layer Layer does not have a `call()` method implemented.
Arguments received by Layer.call():
โข args=('tf.Tensor(shape=(None, None, 64), dtype=float32)',)
โข kwargs=<class 'inspect._empty'>
Arguments received by MixVisionTransformer.call():
โข args=('<KerasTensor shape=(None, 224, 224, 3), dtype=float32, sparse=None, name=keras_tensor_10>',)
โข kwargs=<class 'inspect._empty'>