-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PPO问题 #3
Comments
根本原因->Gym版本问题: 这个 是因为gym版本更新之后,执行 state = env.step(action) 的时候,返回的不是state了,而是一个tuple,这就导致了下面代码报错 state = t.from_numpy(state).to(self.device) 解决方法:
实在抱歉,最近没有研究RL了,跑去搞联邦学习了,所以这个代码仓库没有更新。 |
感谢您的回答! 再次感谢您的回复! |
第一种方案不知道为啥,估计是什么库犯病了,比较麻烦 第二种方案报错是这个原因: 由于GYM库修改了, # 再加个,_ 接收5个参数
next_state, reward, done, _ ,_= env.step(action.item()) 这样就不会报错 由于GYM库的更新,所有包含
|
感谢!已经跑通 |
您好,感谢您的工作!
我在运行PPO算法时,其中PPOGitHub - model.py - 337行“state = t.from_numpy(state).to(self.device)”报错,
TypeError: expected np.ndarray (got tuple)
请问是什么问题呢?谢谢您
The text was updated successfully, but these errors were encountered: