An implementation of convolutional neural network (CNN)