Machine Learning Topological Invariants with Neural Networks