Imported from https://github.com/xyzacademic/RandomDepthwiseCNN