Commit 76c6523c by xiaotong

bug fix in tensor deletion

parent ffc25dd9
...@@ -760,7 +760,7 @@ void XMathGrad::GradMultiplyDim(XTensor * node) ...@@ -760,7 +760,7 @@ void XMathGrad::GradMultiplyDim(XTensor * node)
DelTensorBuf(interGrad); DelTensorBuf(interGrad);
} }
DelTensor(bGradTMP); DelTensorBuf(bGradTMP);
node->visitMark = NODE_FINISHED; node->visitMark = NODE_FINISHED;
} }
...@@ -902,7 +902,7 @@ void XMathGrad::GradPower(XTensor * node) ...@@ -902,7 +902,7 @@ void XMathGrad::GradPower(XTensor * node)
_ScaleAndShiftMe(b, p); _ScaleAndShiftMe(b, p);
_Multiply(node->grad, b, a->grad, 1.0F); _Multiply(node->grad, b, a->grad, 1.0F);
DelTensor(b); DelTensorBuf(b);
node->visitMark = NODE_FINISHED; node->visitMark = NODE_FINISHED;
} }
...@@ -1229,7 +1229,7 @@ void XMathGrad::GradReduceSum(XTensor * node) ...@@ -1229,7 +1229,7 @@ void XMathGrad::GradReduceSum(XTensor * node)
_Unsqueeze(node->grad, b, dim, n); _Unsqueeze(node->grad, b, dim, n);
_Sum(a->grad, b, a->grad); _Sum(a->grad, b, a->grad);
DelTensor(b); DelTensorBuf(b);
node->visitMark = NODE_FINISHED; node->visitMark = NODE_FINISHED;
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论