Dynamic GPU Energy Optimization for Machine Learning Training Workloads