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
Summary:
Pull Request resolved: #661
Simplfied training loop for ghost clipping using only one "double backward" function.
Reviewed By: HuanyuZhang
Differential Revision: D60427371
fbshipit-source-id: 73c016a31f0692adcfa3f6838e74315fbed26bb1
Packages the training loop for Fast Gradient and Ghost Clipping. It does the two backward passes, as well as the loss rescaling and hook operations in between.
30
+
This function also works with DistributedDPOptimizer.
31
+
32
+
Args:
33
+
module: The DP gradient sample module to train
34
+
optimizer: The DP optimizer used to train the module
35
+
loss_per_sample: loss on each sample in the mini-batch of size [batch_size, 1]
0 commit comments