Kan Wu created MXNET-403:
----------------------------

             Summary: fix gradient number and document for box_iou operator 
                 Key: MXNET-403
                 URL: https://issues.apache.org/jira/browse/MXNET-403
             Project: Apache MXNet
          Issue Type: Bug
            Reporter: Kan Wu


{color:#24292e}Hi.{color}
{color:#24292e} There is a bug in mxnet.symbol.contrib.box_iou.{color}
{color:#24292e} When trying to get the gradient of box_iou, it will cause that 
{color}{{mxnet.base.MXNetError: [12:31:16] src/pass/gradient.cc:171: Check 
failed: (*rit)->inputs.size() == input_grads.size() (2 vs. 1) Gradient function 
not returning enough gradient}}{color:#24292e}.{color}
{color:#24292e} I fix the number of gradient and the document in box_iou 
operator.{color}

 

Testing Code:
{color:#d73a49}import{color} mxnet {color:#d73a49}as{color} mx
{color:#d73a49}from{color} mxnet {color:#d73a49}import{color} autograd
x {color:#d73a49}={color} 
mx.nd.array([[{color:#005cc5}0.5{color},{color:#005cc5}0.5{color},{color:#005cc5}1.0{color},{color:#005cc5}1.0{color}],
 
[{color:#005cc5}0.0{color},{color:#005cc5}0.0{color},{color:#005cc5}0.5{color},{color:#005cc5}0.5{color}]])
y {color:#d73a49}={color} 
mx.nd.array([[{color:#005cc5}0.25{color},{color:#005cc5}0.25{color},{color:#005cc5}0.75{color},{color:#005cc5}0.75{color}]])
x.attach_grad()
y.attach_grad()
{color:#d73a49}with{color} autograd.record():
    out {color:#d73a49}={color} mx.nd.contrib.box_iou(x,y)
    {color:#005cc5}print{color} (out)
out.backward()



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@mxnet.apache.org
For additional commands, e-mail: issues-h...@mxnet.apache.org

Reply via email to