2
$\begingroup$

Convolutional Neural Networks (CNN) assume the same sized data. Often sequence data is variable length (e.g., natural language). Thus sequence data is padded to make sure all data is all the same length.

Prepadding is adding zeros to the beginning of shorter sequences. Postpadding is adding zeros to the ending of shorter sequences.

What is the empirical reason to choose prepadding or postpadding?

$\endgroup$

1 Answer 1

1
$\begingroup$

I don't think that it makes a difference. As long as (1) your sequence is long enough to handle a reasonable amount of your sentence/paragraph/whatever and (2) you are consistent in they way you pad between your training cycles and your prediction cycles, then which padding direction you use should be a moot point.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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