The inverse problem for neural networks