Thank you for the code.
From what you (did not) say I assume model is an instance of Transient, but then the way you use model does not match the definition of Transient in at least a couple of ways:


Transnet.forward() expects two arguments, but you pass in only one argument in the first call to model(). The second argument to forward does not have a default value either. How exactly does this work? I would expect Python to abort with an error when it tries to execute this line. Does this not happen?

Transnet.forward() returns a tuple with two values, but you assign this tuple to three variables for both the calls to model(). How exactly does this work? I would expect Python to abort with an error when it tries to execute this line. Does this not happen?

Or is model an instance of some other class?
When you provide code for us to look at, could you please provide actual code that runs and produces the error that you wish to address, instead of code that doesn’t even “compile”?  Note that this code doesn’t have to be the exact code that you run; it just has to be something that shows the same behaviour around the issue that you face.
If you give me code that doesn’t work at some fundamental level (such as: it is not executable Python), I don’t see the point in trying to figure out what is wrong with it.