Deep learning in porous media