提交 30ce3c60 编写于 作者: M Megvii Engine Team 提交者: Xinran Xu

Revert "fix(mgb/opr): change EQ opr's backward_graph to nullptr instead of InvalidGrad"

This reverts commit 635533764101de2336ee0216bc51018aef59578d.

GitOrigin-RevId: 6897f6d45d8fda1ee671f5d24ec314b8bfb76a48
上级 14e71b55
......@@ -42,9 +42,6 @@ SymbolVar ROIAlignForward::make(SymbolVar src, SymbolVar rois,
#ifdef MGB_ENABLE_GRAD
MGB_IMPL_OPR_GRAD(ROIAlignForward) {
if (out_grad[1]) {
return InvalidGrad::make(opr, wrt_idx);
}
if (wrt_idx == 0) {
// wrt src
SymbolVar grad =
......
......@@ -86,7 +86,7 @@ size_t ROIPoolingForward::get_workspace_size_bytes(
#ifdef MGB_ENABLE_GRAD
MGB_IMPL_OPR_GRAD(ROIPoolingForward) {
if (out_grad[1] || wrt_idx == 2) {
if (wrt_idx == 2) {
return InvalidGrad::make(opr, wrt_idx);
}
if (wrt_idx == 0) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册