Imported from https://github.com/Aiqz/bayes-by-hypernet