opacus
opacus copied to clipboard
Microbatch Support
Though clipping gradient for each instance brings higher accuracy, but it is very slow. Meanwhlie, layer.weight.grad_sample consumes too much memory, which forces me to use small model and small batch size. Could you support gradient clipping after averaging micro-batches like that in tensorflow-privacy?
Hi, we have the similar concept with called virtual_batch. Please take a look at our imagenet example