Add measurements for ClippingFactory, ZeroingFactory and ZeroingClippingFactory.
For now measurements are aggregated by SumFactory, but we will add support in the future for private measurements aggregation. Also: 1. Change state to OrderedDict (from tuple). 2. Change default zeroing norm order from np.inf to 2 for ease of transition between ZeroingFactory and ZeroingClippingFactory (which must use 2-norm), and use tf.linalg.global_norm if norm order is 2, for efficiency. PiperOrigin-RevId: 339908232
Showing
- tensorflow_federated/python/aggregators/BUILD 1 addition, 0 deletionstensorflow_federated/python/aggregators/BUILD
- tensorflow_federated/python/aggregators/clipping_factory.py 152 additions, 56 deletionstensorflow_federated/python/aggregators/clipping_factory.py
- tensorflow_federated/python/aggregators/clipping_factory_test.py 172 additions, 19 deletions...low_federated/python/aggregators/clipping_factory_test.py
Loading
Please register or sign in to comment