paddlepaddle吧 关注:211贴子:310
  • 0回复贴,共1

请问这个报错是为什么?

只看楼主收藏回复

---------------------------------------------------------------------------SystemError Traceback (most recent call last)Cell In[1], line 495 493 loss = model.loss(temp_labels) 494 avg_loss=fluid.layers.mean(loss)--> 495 avg_loss.backward() 496 opt.minimize(avg_loss) 497 opt.clear_gradients()File E:\Miniconda\envs\myenv1\lib\site-packages\decorator.py:232, in decorate.<locals>.fun(*args, **kw) 230 if not kwsyntax: 231 args, kw = fix(args, kw, sig)--> 232 return caller(func, *(extras + args), **kw)File E:\Miniconda\envs\myenv1\lib\site-packages\paddle\fluid\wrapped_decorator.py:26, in wrap_decorator.<locals>.__impl__(func, *args, **kwargs) 23 @decorator.decorator 24 def __impl__(func, *args, **kwargs): 25 wrapped_func = decorator_func(func)---> 26 return wrapped_func(*args, **kwargs)File E:\Miniconda\envs\myenv1\lib\site-packages\paddle\fluid\framework.py:534, in _dygraph_only_.<locals>.__impl__(*args, **kwargs) 529 def __impl__(*args, **kwargs): 530 assert _non_static_mode(), ( 531 "We only support '%s()' in dynamic graph mode, please call 'paddle.disable_static()' to enter dynamic graph mode." 532 % func.__name__ 533 )--> 534 return func(*args, **kwargs)File E:\Miniconda\envs\myenv1\lib\site-packages\paddle\fluid\dygraph\varbase_patch_methods.py:297, in monkey_patch_varbase.<locals>.backward(self, grad_tensor, retain_graph) 295 else: 296 if framework._in_eager_mode_:--> 297 core.eager.run_backward([self], grad_tensor, retain_graph) 298 else: 299 core.dygraph_run_backward([self], [grad_tensor], 300 retain_graph, 301 framework._dygraph_tracer())SystemError: (Fatal) Unable to fill empty grad inputs due to empty GradSlotMeta (at ..\paddle\fluid\eager\utils.cc:502)


IP属地:上海1楼2024-01-09 10:51回复