Hi, I implemented a U-Net and would like to switch between train and test mode for the BN layers.
struct Unet
encoder # tuple of chains
decoder # tuple of UpBlocks
segmentation_head # normal conv layer
end
Flux.@functor Unet
...
As of now testmode!(unet)
just returns the input with nothing changed. Do I have to manually implement it for the building blocks and the model itself or is there some smart way to circumvent this? Some models are simply not a Chain
in their structure…
Edit: By chance I found this issue, which suggests that I have to do so. Can the user somehow be warned if testmode! changes nothing?