Gradient calculation when module used multiple times (e.g. siamese network)

the gradients are summed (i.e. accumulated).

3 Likes