Mat1 and mat2 shapes cannot be multiplied!

This answer here discusses in detail about how to create your own custom forward call using a pre-defined model.

This post here discusses about removing intermediate layers from a model.

Hope these are helpful.

1 Like