Value Function Based Performance Optimization of Deep Learning Workloads