Multiplying CTC loss by 0 has no effects


I used CTC loss to train my network. The CTC loss is borrowed from I set length_average = True in the CTC loss. I was able to train my network. But, I found that if I multiple the loss by 0, such as loss = 0 * CTC_loss(arguments…) ( originally it was loss = CTC_loss(arguments…), and do loss.backward(), the result does not change. Anyone has ideas why scaling by 0 does not change result at all?

Thank you very much