Imported from https://github.com/Gouet/PPO-pytorch