Estimating Network Models using Neural Networks