You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixed Opacus's Runtime error with an empty batch (issue 612) (#631)
Summary:
Pull Request resolved: #631
In case of an empty batch, in the ```clip_and_accumulate``` function, the ```per_sample_clip_factor``` variable is set to a tensor of size 0. However, the device was not specified, which throws a runtime error. Added it.
Reviewed By: HuanyuZhang
Differential Revision: D53733081
fbshipit-source-id: 9435d4dc1a7f37852bd52d2507c37b7ca1ef11a9
0 commit comments