Describe the bug
This issue has been observed in the tutorials: Project-MONAI/tutorials#2030 (comment).
Expected behavior
The out layer should not be set in the forward loop because:
- The device is wrong in this scenario
- The parameters from this layer are not included in the optimizer trainable args.
Additional context
This was caused by fix #8514.