Weakly supervised deep learning for tissue image analysis