Input(Out@GRAD) shouldn't be null错误怎么排查
Created by: alexqdh
程序还没有开始运行,加上optimizer以后报错
optimizer = fluid.optimizer.Adam(learning_rate=self.lr)
train_op = optimizer.minimize(cost)
报错信息:
Input(Out@GRAD) shouldn't be null. at [/paddle/paddle/fluid/operators/reshape_op.cc:314]
PaddlePaddle Call Stacks:
0 0x7fd071284455p void paddle::platform::EnforceNotMet::IniTraceback (most recent call last):
File "main.py", line 24, in <module>
autodl_exe = autodl.AutoDL()
File "/paddle/parl/paddle-demo/autodl/autodl.py", line 40, in __init__
self.controller = AutoDLController(self.algorithm, self.parse_args)#self.parse_args.num_nodes,
File "/paddle/parl/paddle-demo/autodl/autodl_controller.py", line 34, in __init__
super(AutoDLController, self).__init__(algorithm)
File "/usr/local/lib/python2.7/dist-packages/parl-1.0-py2.7.egg/parl/framework/agent_base.py", line 46, in __init__
self.build_program()
File "/paddle/parl/paddle-demo/autodl/autodl_controller.py", line 74, in build_program
self.update_op = self.alg.define_learn(obs=inputs, reward=reward, action=None)
File "/paddle/parl/paddle-demo/autodl/reinforce_policy_gradient.py", line 71, in define_learn
train_op = optimizer.minimize(cost)
File "/usr/local/lib/python2.7/dist-packages/paddle/fluid/optimizer.py", line 404, in minimize
parameter_list, no_grad_set)
File "/usr/local/lib/python2.7/dist-packages/paddle/fluid/optimizer.py", line 316, in backward
return append_backward(loss, parameter_list, no_grad_set, callbacks)
File "/usr/local/lib/python2.7/dist-packages/paddle/fluid/backward.py", line 518, in append_backward
_append_backward_vars_(root_block, fwd_op_num, grad_to_var, grad_info_map)
File "/usr/local/lib/python2.7/dist-packages/paddle/fluid/backward.py", line 354, in _append_backward_vars_
op_desc.infer_shape(block.desc)
EnforceNotMet: Input(Out@GRAD) shouldn't be null. at [/paddle/paddle/fluid/operators/reshape_op.cc:314]