mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-12-11 06:55:27 +00:00
Fix to print statement
This commit is contained in:
parent
4eb3e97848
commit
b9326e1ef2
@ -799,7 +799,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