mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-12-11 06:55:27 +00:00
Some cosmetic improvements
This commit is contained in:
parent
71b3756ada
commit
76e66408c5
@ -179,7 +179,7 @@ class MaxEigLimiterFunction(torch.autograd.Function):
|
||||
ans_direction = ans_direction / ans_direction.norm()
|
||||
|
||||
if random.random() < 0.001:
|
||||
logging.info(f"variance_proportion = {variance_proportion.item()}")
|
||||
logging.info(f"variance_proportion = {variance_proportion.item()}, shape={tuple(x.shape)}")
|
||||
|
||||
# Caution: this causes a CUDA sync, which is not ideal.
|
||||
if variance_proportion >= max_variance_proportion:
|
||||
|
||||
@ -240,7 +240,7 @@ class TensorDiagnostic(object):
|
||||
ans = stats.tolist()
|
||||
ans = ["%.2g" % x for x in ans]
|
||||
ans = "[" + " ".join(ans) + "]"
|
||||
if stats_type == "value":
|
||||
if stats_type in [ "value", "rms", "eigs" ]:
|
||||
# This norm is useful because it is strictly less than the largest
|
||||
# sqrt(eigenvalue) of the variance, which we print out, and shows,
|
||||
# speaking in an approximate way, how much of that largest eigenvalue
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user