Imported from https://github.com/tensorflow/neural-structured-learning