Imported from https://github.com/tensorflow/models/tree/master/research/learned_optimizer