PaddlePaddle / PARL

A high-performance distributed training framework for Reinforcement Learning

Home Page:https://parl.readthedocs.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

科科老师的强化学习课程里面介绍的静态图方法的DQN代码运行过程中总是报错找不到agent类中的变量

Prememore opened this issue · comments

pred_q = self.fluid_executor.run(self.pred_program, feed={'obs': obs.astype('float32')}, fetch_list=[self.value0])[0]
这一段代码在运行的时候总是报错:
AttributeError: 'dqnagent' object has no attribute 'pred_program'.
这里的dqnagent是我的agent类名称;
如果把self.pred_program的声明不按照课件里面的放在build_program函数里,而是放在__init__下面,则报错:
AttributeError: 'dqnagent' object has no attribute 'value'.
这是什么问题?静态图的建立中声明的self变量是无法识别的么?

感谢你的反馈,麻烦提供下你的py版本、运行系统、以及parl版本。