Imported from https://github.com/mlperf/mlbox