Does padding data with zero affect gradients?

69 Views Asked by At

If we have a bunch of variable length sequences and pad them with 0s to all have the same length, so we can do minibatching, and then directly pass this minibatch into a 1D convolution, will the zeros have an effect on the gradient? How to prove?