Computational Mechanics with Neural Networks