Commit 2ed5a029 by xiaotong

fix misuse of XLink::AddParamToHead

parent 51fe2255
......@@ -119,8 +119,8 @@ XTensor SelectRange(const XTensor &a, int dim, int low, int high)
/* tensor connection */
XLink::MakeLink(&a, NULL, &c, GETANDSET_SELECT);
XLink::AddParamToHead(&c, low);
XLink::AddParamToHead(&c, high);
XLink::AddParamToHeadInt(&c, low);
XLink::AddParamToHeadInt(&c, high);
/* destroy variables */
delete[] dimSize;
......
......@@ -135,11 +135,11 @@ XTensor CopyIndexed(const XTensor &s, int dim, int * srcIndex, int indexSize, in
/* tensor connection */
XLink::MakeLink(&s, NULL, &t, MOVEMENT_COPYINDEXED);
XLink::AddParamToHead(&t, dim);
XLink::AddParamToHeadInt(&t, dim);
XLink::AddParamToHeadPointer(&t, srcIndex);
XLink::AddParamToHead(&t, indexSize);
XLink::AddParamToHeadInt(&t, indexSize);
XLink::AddParamToHeadPointer(&t, tgtIndex);
XLink::AddParamToHead(&t, copyNum);
XLink::AddParamToHeadInt(&t, copyNum);
return t;
}
......
......@@ -125,7 +125,7 @@ XTensor ReduceMax(const XTensor &input, int dim)
/* tensor connection */
XLink::MakeLink(&input, NULL, &output, REDUCE_REDUCEMAX);
XLink::AddParamToHead(&output, dim);
XLink::AddParamToHeadInt(&output, dim);
return output;
}
......
......@@ -79,7 +79,7 @@ XTensor ReduceMean(const XTensor &input, int dim)
/* tensor connection */
XLink::MakeLink(&input, NULL, &output, REDUCE_REDUCEMEAN);
XLink::AddParamToHead(&output, dim);
XLink::AddParamToHeadInt(&output, dim);
/* destroy variables */
delete[] dimSize;
......
......@@ -235,7 +235,7 @@ XTensor ReduceSum(const XTensor &input, int dim, const XTensor &shift, DTYPE pow
/* tensor connection */
XLink::MakeLink(&input, &shift, &output, REDUCE_REDUCESUM);
XLink::AddParamToHead(&output, dim);
XLink::AddParamToHeadInt(&output, dim);
XLink::AddParamToHead(&output, power);
/* destroy variables */
......
......@@ -75,7 +75,7 @@ XTensor ReduceSumSquared(const XTensor &input, int dim, const XTensor &shift)
/* tensor connection */
XLink::MakeLink(&input, &shift, &output, REDUCE_REDUCESUMSQUARED);
XLink::AddParamToHead(&output, dim);
XLink::AddParamToHeadInt(&output, dim);
/* destroy variables */
delete[] dimSize;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论