Building a convolutional neural network