Imported from https://github.com/IBM/tensorflow-large-model-support