Brick classification using a convolutional neural network