Bug fix to print statement

This commit is contained in:
Daniel Povey 2022-06-17 15:35:07 +08:00
parent 90622f88ad
commit 6873aa1a13

View File

@ -710,7 +710,7 @@ class NeutralGradient(Optimizer):
# Roundoff can cause significant differences, so use a fairly large # Roundoff can cause significant differences, so use a fairly large
# threshold of 0.001. We may increase this later or even remove the check. # threshold of 0.001. We may increase this later or even remove the check.
if not C_diff.abs().mean() < 0.01 * C.diag().mean(): if not C_diff.abs().mean() < 0.01 * C.diag().mean():
print("Warning: large C_diff: {C_diff.abs().mean()}, C diag mean: {C.diag().mean()}") print(f"Warning: large C_diff: {C_diff.abs().mean()}, C diag mean: {C.diag().mean()}")
return P return P