Imported from https://github.com/p-christ/Deep-Reinforcement-Learning-Algorithms-with-PyTorch