Chapter 4

Foundations of Convolutional Neural Network

Learning Objectives

By the end of this chapter, you will be able to:

  • Describe the inspiration for CNNs in neural science
  • Describe the convolution operations
  • Describe a basic CNN architecture for a classification task
  • Implement a simple CNN for image and text classification tasks
  • Implement a CNN for a sentiment analysis of text

In this chapter, we aim to cover the architecture of convolutional neural networks (CNNs) and gain an intuition of CNNs based on their applications on image data, before delving into their applications in natural language processing.


Neural networks, as a broad field, borrow a lot from biological systems, particularly the brain. Advances in neural ...

Get Deep Learning for Natural Language Processing now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.