Skip to content
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

Set stop_gradient=True for some variables in SSD API. #9395

Closed
qingqing01 opened this issue Mar 27, 2018 · 0 comments
Closed

Set stop_gradient=True for some variables in SSD API. #9395

qingqing01 opened this issue Mar 27, 2018 · 0 comments

Comments

@qingqing01
Copy link
Contributor

qingqing01 commented Mar 27, 2018

When the outputs of ParallelDo op are not used by any operators and does not set stop_gradient = True. The backward transpiler will fail. For example, without #9360 , the error in MobileNet-SSD with parallel_do_op is as follows:

  File "train.py", line 160, in <module>
    num_passes=300)
  File "train.py", line 86, in train
    optimizer.minimize(loss)
  File "/home/users/dangqingqing/.jumbo/lib/python2.7/site-packages/paddle/fluid/optimizer.py", line 235, in minimize
    [error_clip_callback])
  File "/home/users/dangqingqing/.jumbo/lib/python2.7/site-packages/paddle/fluid/backward.py", line 479, in append_backward
    _append_backward_vars_(root_block, fwd_op_num, grad_to_var, grad_info_map)
  File "/home/users/dangqingqing/.jumbo/lib/python2.7/site-packages/paddle/fluid/backward.py", line 367, in _append_backward_vars_
    _append_backward_vars_(sub_block, 0, grad_to_var, grad_info_map)
  File "/home/users/dangqingqing/.jumbo/lib/python2.7/site-packages/paddle/fluid/backward.py", line 382, in _append_backward_vars_
    op_desc.infer_shape(block.desc)
paddle.fluid.core.EnforceNotMet: Input(Out@GRAD) should not be null at [/home/users/dangqingqing/Paddle/paddle/fluid/operators/transpose_op.cc:107]
PaddlePaddle Call Stacks:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant