Machine Learning Optimization of Quantum Circuit Layouts