mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-12-11 06:55:27 +00:00
Bug fix to printing code
This commit is contained in:
parent
076b18db60
commit
f66c1600f4
@ -914,7 +914,7 @@ class WithLoss(torch.autograd.Function):
|
|||||||
ctx.y_shape = y.shape
|
ctx.y_shape = y.shape
|
||||||
if random.random() < 0.002 and name is not None:
|
if random.random() < 0.002 and name is not None:
|
||||||
loss_sum = y.sum().item()
|
loss_sum = y.sum().item()
|
||||||
logging.info(f"WithLoss: name={ctx.name}, loss-sum={loss_sum:.3e}")
|
logging.info(f"WithLoss: name={name}, loss-sum={loss_sum:.3e}")
|
||||||
return x
|
return x
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def backward(ctx, ans_grad: Tensor):
|
def backward(ctx, ans_grad: Tensor):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user