Add Lod information for gather_nd & scatter_nd (#21404)

* add lod information, test=develop

* add lod, test=develop

* fix lod, test=develop

* fix lod, test=develop
revert-21172-masked_select_api
ShenLiang 6 years ago committed by Yi Liu
parent c0656dcb1a
commit e2c6f434ec

@ -55,6 +55,7 @@ class GatherNdOp : public framework::OperatorWithKernel {
}
ctx->SetOutputDim("Out", framework::make_ddim(result_dims));
ctx->ShareLoD("X", /*->*/ "Out");
}
protected:

@ -64,6 +64,7 @@ class ScatterNdAddOp : public framework::OperatorWithKernel {
"Updates has wrong shape");
}
ctx->SetOutputDim("Out", ref_dims);
ctx->ShareLoD("X", /*->*/ "Out");
}
protected:

Loading…
Cancel
Save