I tried also with run_eagerly=True, but got AttributeError: 'Tensor' object has no attribute 'numpy'. And when not using numpy() i got error on tf.constant(mask_preds) of TypeError: Expected any non-tensor type, got a tensor instead and other problems.
The mentioned repo is in  XIinlong-SOLO is implemented in Pytorch and looking into it they have a bit different approach. They use a lot of loops…
Maybe I will just skip the decoupled head and use coupled head which should be more straightforward for implementation as I don’t need to multiply two Conv2D layers.
I just thought that multiplying two