opacus icon indicating copy to clipboard operation
opacus copied to clipboard

EmbeddingBag with offsets is not supported on Opacus

Open karthikprasad opened this issue 3 years ago • 0 comments

🐛 Bug

Opacus only captures the first argument to a module's forward as activations in the capture_activations_hook and misses out on other args such as offsets in case of nn.EmbeddingBag

This results in an error during per-sample grad computation even with functorch.

COLAB: https://drive.google.com/file/d/1wvfO3roibmYxtHV_SBcdW3PjkrkCxalW/view?usp=sharing

karthikprasad avatar Oct 04 '22 18:10 karthikprasad