Imported from https://github.com/matthew-norton/Diametrical_Learning
