Machine Learning Methods to Optimize the Geometry and Topology of Meshes