Zhou Zhong

Results 2 comments of Zhou Zhong

同问,本地已安装 tensorflow_gpu,测试脚本是能看到 gpu。 train.py,有将 device设置成 cuda,但是还是没有效果。 ![image](https://user-images.githubusercontent.com/2673524/233958787-cea6da7f-9670-40bd-945f-820e8250cc08.png)

进入PPO文件可以看到,引入了 torch,所以需要再conda环境里面,安装torch,否则会默认 cpu 训练。 安装torch方法,要注意你本地 cuda 版本,版本对应关系如下:https://pytorch.org/get-started/previous-versions/ 最后加一段测试代码,到 ppo.py,可以查看GPU是否启用。 ` if th.cuda.is_available(): print("CUDA is available!") else: print("CUDA is not available.") ` 执行结果如下: ![image](https://user-images.githubusercontent.com/2673524/234212898-92946312-16fa-4523-a518-73877398e496.png)