When running under DP, Opacus checks that the models don't have batch normalization layers, that are unsupported under DP, and throws an error if such exists.
This error has the full stacktrace and is difficult to interpret. Instead we should return a nice error to the user that has a clear meaning, likely wrapped insider a typer.BadParameter().
When running under DP, Opacus checks that the models don't have batch normalization layers, that are unsupported under DP, and throws an error if such exists.
This error has the full stacktrace and is difficult to interpret. Instead we should return a nice error to the user that has a clear meaning, likely wrapped insider a typer.BadParameter().