Understanding one-dimensional convolution for sequence data

In Chapter 5, Deep Learning for Computer Vision, we have seen how two-dimensional weights are learned from the training data. These weights move across the image to generate different activations. In the same way, one-dimensional convolution activations are learned during training of our text classifier, where these weights learn patterns by moving across the data. The following diagram explains how one-dimensional convolutions will work:

For training a text classifier on the IMDB dataset, we will follow the same steps as we followed for building the classifier using LSTM. The only ...

Get Deep Learning with PyTorch now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.