Impact of stain normalization and patch selection on the performance of convolutional neural networks in histological breast and prostate cancer classification