Imported from https://github.com/yfnn/fused-model