Imported from https://github.com/jiweeo/pytorch-stochastic-depth