fix handcode_opt.py for bert (#6756)

This commit is contained in:
chenyu 2024-09-26 00:20:24 -04:00 committed by GitHub
commit 0424c4967d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -53,7 +53,7 @@ def get_sched_bert():
# ignore grad norm and loss scaler for now
loss.backward()
targets += [x.lazydata for x in optim.schedule_step()]
sched = create_schedule(targets, seen)
sched = create_schedule(targets)
print(f"schedule length {len(sched)}")
return sched