-
Either use the proposed approach from your cross post or initialize the layers first and use a switch in the custom
forward
method. -
I would write a custom dropout layer, which accepts an additional flag to resample the mask.
1 Like