I don’t mind calculating twice.
I just want to understand how to do it.
I prefer the most readable code over “Tricky” one to save some computations.
The problem I face is how to define the optimizers as optimizer is defined on a net yet both use the same net.
@SimonW, By the way, could you explain the difference between what you posted at first and the second?