Thanks for your answer! I think you may have posted the wrong method: The model contains DecoderBlock but you posted DecoderBlockLinkNet.
In the meantime, I was lucky to stumble upon this trick: Wrap parameters in deepcopy 106. I tried it and wrapped all references to self.encoder with copy.deepcopy and it now it traces and exports! Seems like the shared parameter was actually self.encoder!
I’m still verifying that the exported model is actually working as expected but am optimistic. I’ll write again soon…