fixedclipping_mod¶

fixedclipping_mod(msg: Message, ctxt: Context, call_next: Callable[[Message, Context], Message]) Message[source]¶

Client-side fixed clipping modifier.

This mod needs to be used with the DifferentialPrivacyClientSideFixedClipping server-side strategy wrapper.

The wrapper sends the clipping_norm value to the client.

This mod clips the client model updates before sending them to the server.

It operates on messages of type MessageType.TRAIN.

Notes

Consider the order of mods when using multiple.

Typically, fixedclipping_mod should be the last to operate on params.