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