opacus icon indicating copy to clipboard operation
opacus copied to clipboard

Microbatch Support

Open JerryLife opened this issue 6 years ago • 1 comments

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?

JerryLife avatar Jun 27 '20 11:06 JerryLife

Hi, we have the similar concept with called virtual_batch. Please take a look at our imagenet example

JohnlNguyen avatar Jun 29 '20 16:06 JohnlNguyen