Machine Learning and Simulations for Physical Neural Networks