1
$\begingroup$

In the code that accompanies the paper describing the TCN network, the activations of the temporal convolutions are "chomped", or sliced at the end by the number of zero-padding that was added. This ensures that the size of the input and the hidden layers match. Why is it that only one end of the activations are sliced? Why not have the activations sliced evenly from both ends? Is this what causes the convolution to be causal?

Code: https://github.com/locuslab/TCN/blob/master/TCN/tcn.py

Paper: https://arxiv.org/pdf/1803.01271.pdf

$\endgroup$

1 Answer 1

2
$\begingroup$

This is because the padding is done in the Convolution layer thus padding left and right. The Chomp module simply removes excess right padding from Convolutional output.

If you left pad only before the convolution, you won't need to chomp.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.