D:\kj7541\Anaconda3\envs\pdl\python.exe F:/kj7541/AI/RL/MyStudy/AC_PDL/MY_AC_dygraph.py D:\kj7541\Anaconda3\envs\pdl\lib\site-packages\paddle\fluid\executor.py:1070: UserWarning: The following exception is not an EOF exception. "The following exception is not an EOF exception.") Traceback (most recent call last): File "F:/kj7541/AI/RL/MyStudy/AC_PDL/MY_AC_dygraph.py", line 56, in critic.train(dat(state), dat(reward), dat(next_state)) File "F:/kj7541/AI/RL/MyStudy/AC_PDL/MY_AC_dygraph.py", line 34, in train fetch_list=[self.value])[0] File "D:\kj7541\Anaconda3\envs\pdl\lib\site-packages\paddle\fluid\executor.py", line 1071, in run six.reraise(*sys.exc_info()) File "D:\kj7541\Anaconda3\envs\pdl\lib\site-packages\six.py", line 703, in reraise raise value File "D:\kj7541\Anaconda3\envs\pdl\lib\site-packages\paddle\fluid\executor.py", line 1066, in run return_merged=return_merged) File "D:\kj7541\Anaconda3\envs\pdl\lib\site-packages\paddle\fluid\executor.py", line 1154, in _run_impl use_program_cache=use_program_cache) File "D:\kj7541\Anaconda3\envs\pdl\lib\site-packages\paddle\fluid\executor.py", line 1229, in _run_program fetch_var_name) paddle.fluid.core_noavx.EnforceNotMet:
-------------------------------------------- C++ Call Stacks (More useful to developers): -------------------------------------------- Windows not support stack backtrace yet.
------------------------------------------ Python Call Stacks (More useful to users): ------------------------------------------ File "D:\kj7541\Anaconda3\envs\pdl\lib\site-packages\paddle\fluid\framework.py", line 2610, in append_op attrs=kwargs.get("attrs", None)) File "D:\kj7541\Anaconda3\envs\pdl\lib\site-packages\paddle\fluid\layers\math_op_patch.py", line 158, in _scalar_elementwise_op_ "bias": bias}) File "D:\kj7541\Anaconda3\envs\pdl\lib\site-packages\paddle\fluid\layers\math_op_patch.py", line 174, in _scalar_elementwise_mul_ return _scalar_elementwise_op_(var, value, 0.0) File "D:\kj7541\Anaconda3\envs\pdl\lib\site-packages\paddle\fluid\layers\math_op_patch.py", line 193, in __impl__ return scalar_method(self, other_var) File "F:/kj7541/AI/RL/MyStudy/AC_PDL/MY_AC_dygraph.py", line 25, in _built_net self.td_error = reward + self.gamma * next_reward_ - self.value File "F:/kj7541/AI/RL/MyStudy/AC_PDL/MY_AC_dygraph.py", line 13, in __init__ self._built_net() File "F:/kj7541/AI/RL/MyStudy/AC_PDL/MY_AC_dygraph.py", line 45, in critic = Critic(exe, gamma=0.9, state_dim=4, lr=0.005)
---------------------- Error Message Summary: ---------------------- InvalidArgumentError: The Tensor in the scale Op's Input Variable X(next_reward_) is not initialized. [Hint: Expected t->IsInitialized() == true, but received t->IsInitialized():0 != true:1.] at (D:\1.8.1\paddle\paddle\fluid\framework\operator.cc:1289) [operator < scale > error]
这个很简单,因为你定义fluid.data的时候包含三个var,state、reward和next_reward_,但是在第一个exe中只送入state,在第二个exe才将3个var全部占满。
因此在第一个exe计算的时候会缺少两个变量导致无法计算 self.td_error = reward + self.gamma * next_reward_ - self.value
我不清楚你这个是什么任务,下面这段代码可以作为参考
希望能帮到你
D:\kj7541\Anaconda3\envs\pdl\python.exe F:/kj7541/AI/RL/MyStudy/AC_PDL/MY_AC_dygraph.py
D:\kj7541\Anaconda3\envs\pdl\lib\site-packages\paddle\fluid\executor.py:1070: UserWarning: The following exception is not an EOF exception.
"The following exception is not an EOF exception.")
Traceback (most recent call last):
File "F:/kj7541/AI/RL/MyStudy/AC_PDL/MY_AC_dygraph.py", line 56, in
critic.train(dat(state), dat(reward), dat(next_state))
File "F:/kj7541/AI/RL/MyStudy/AC_PDL/MY_AC_dygraph.py", line 34, in train
fetch_list=[self.value])[0]
File "D:\kj7541\Anaconda3\envs\pdl\lib\site-packages\paddle\fluid\executor.py", line 1071, in run
six.reraise(*sys.exc_info())
File "D:\kj7541\Anaconda3\envs\pdl\lib\site-packages\six.py", line 703, in reraise
raise value
File "D:\kj7541\Anaconda3\envs\pdl\lib\site-packages\paddle\fluid\executor.py", line 1066, in run
return_merged=return_merged)
File "D:\kj7541\Anaconda3\envs\pdl\lib\site-packages\paddle\fluid\executor.py", line 1154, in _run_impl
use_program_cache=use_program_cache)
File "D:\kj7541\Anaconda3\envs\pdl\lib\site-packages\paddle\fluid\executor.py", line 1229, in _run_program
fetch_var_name)
paddle.fluid.core_noavx.EnforceNotMet:
--------------------------------------------
C++ Call Stacks (More useful to developers):
--------------------------------------------
Windows not support stack backtrace yet.
------------------------------------------
Python Call Stacks (More useful to users):
------------------------------------------
File "D:\kj7541\Anaconda3\envs\pdl\lib\site-packages\paddle\fluid\framework.py", line 2610, in append_op
attrs=kwargs.get("attrs", None))
File "D:\kj7541\Anaconda3\envs\pdl\lib\site-packages\paddle\fluid\layers\math_op_patch.py", line 158, in _scalar_elementwise_op_
"bias": bias})
File "D:\kj7541\Anaconda3\envs\pdl\lib\site-packages\paddle\fluid\layers\math_op_patch.py", line 174, in _scalar_elementwise_mul_
return _scalar_elementwise_op_(var, value, 0.0)
File "D:\kj7541\Anaconda3\envs\pdl\lib\site-packages\paddle\fluid\layers\math_op_patch.py", line 193, in __impl__
return scalar_method(self, other_var)
File "F:/kj7541/AI/RL/MyStudy/AC_PDL/MY_AC_dygraph.py", line 25, in _built_net
self.td_error = reward + self.gamma * next_reward_ - self.value
File "F:/kj7541/AI/RL/MyStudy/AC_PDL/MY_AC_dygraph.py", line 13, in __init__
self._built_net()
File "F:/kj7541/AI/RL/MyStudy/AC_PDL/MY_AC_dygraph.py", line 45, in
critic = Critic(exe, gamma=0.9, state_dim=4, lr=0.005)
----------------------
Error Message Summary:
----------------------
InvalidArgumentError: The Tensor in the scale Op's Input Variable X(next_reward_) is not initialized.
[Hint: Expected t->IsInitialized() == true, but received t->IsInitialized():0 != true:1.] at (D:\1.8.1\paddle\paddle\fluid\framework\operator.cc:1289)
[operator < scale > error]
方便把错误回溯发一下吗
提了,官方的人还没有搞定。刚刚又碰到了同样的错误了。突然感觉paddle很垃圾,但奈何他是国产的,还是要继续喜欢他啊。
辛苦提一下issue吧
https://github.com/PaddlePaddle/Paddle/issues
试了,没用。太蛋疼了
你用cpu跑一下看看,如果显存不够或者在项目中跑多卡都有可能出现这种情况的
exe.run(fluid.default_startup_program())
你是运行 fluid.default_statrtup_program()
还是运行 exe.run(fluid.default_statrtup_program())
呢?
还有这个未初始化
被初始化给按在地上反复的摩擦
在社区里面也没找到相关的答案
不止这个fluid.data出现未初始化的情况,其他的有些计算的中间过程也出现过为初始化的情况