Fixed bugs in CNN implementation

Started training a CNN on the MNIST database