2022 Developer Survey is open! Take survey.

Hot answers tagged

1 vote

Is reconciling shape discrepancies the only purpose of padding?

Learning "border effects" is another reason to use padding at least in convolutional neural networks. This paper specifically looks at 2D CNNs for image processing. In my experience, I use ...
user avatar
1 vote
Accepted

Is it a good practice to pad signal before feature extraction?

Padding is a common practice both in image-processing (typically via CNNs) and in sequence-processing tasks (RNNs, Transformers). For CNNs all the standard convolutional layers - Conv1D, Conv2D and ...
user avatar
  • 1,773
1 vote
Accepted

Text classification of non-equal length texts, should I pad left or right?

For any model that does not take a time series approach like an RNN does, the padding shouldn't make a difference. I prefer padding right simply because there also might be text you need to cut-off. ...
user avatar
  • 246

Only top scored, non community-wiki answers of a minimum length are eligible