dmlc / mshadow

Matrix Shadow:Lightweight CPU/GPU Matrix and Tensor Template Library in C++/CUDA for (Deep) Machine Learning
Other
1.11k stars 432 forks source link

Dot Product Implementation:missing? #145

Open marcoippolito opened 8 years ago

marcoippolito commented 8 years ago

marco@marco:~/disco_vecchio/jreasoning/proveMshadow$ g++ -O3 -std=c++11 -DUSE_BLAS=openblas -I /home/marco/mshadow-master/ -I /usr/local/cuda/include -lm tensorConstruction.cpp -otensorConstruction tensorConstruction.cpp: In function ‘int main()’: tensorConstruction.cpp:86:20: error: no matching function for call to ‘dot(mshadow::Tensor<mshadow::cpu, 2, float>&, mshadow::Tensor<mshadow::cpu, 1>&, int)’ AdotW = dot(A,w,1); ^ In file included from /home/marco/mshadow-master/mshadow/tensor.h:17:0, from tensorConstruction.cpp:2: /home/marco/mshadow-master/mshadow/./expression.h:223:1: note: candidate: template<class TA, class TB, class DType> mshadow::expr::DotExp<TA, TB, false, false, DType> mshadow::expr::dot(const mshadow::expr::RValueExp<TA, DType>&, const mshadow::expr::RValueExp<TB, DType>&) dot(const RValueExp<TA, DType> &lhs, const RValueExp<TB, DType> &rhs) { ^ /home/marco/mshadow-master/mshadow/./expression.h:223:1: note: template argument deduction/substitution failed: tensorConstruction.cpp:86:20: note: candidate expects 2 arguments, 3 provided AdotW = dot(A,w,1); ^ In file included from /home/marco/mshadow-master/mshadow/tensor.h:17:0, from tensorConstruction.cpp:2: /home/marco/mshadow-master/mshadow/./expression.h:229:1: note: candidate: template<class TA, class TB, class DType> mshadow::expr::DotExp<TA, TB, true, false, DType> mshadow::expr::dot(const mshadow::expr::TransposeExp<TA, DType>&, const mshadow::expr::RValueExp<TB, DType>&) dot(const TransposeExp<TA, DType> &lhs, const RValueExp<TB, DType> &rhs) { ^ /home/marco/mshadow-master/mshadow/./expression.h:229:1: note: template argument deduction/substitution failed: tensorConstruction.cpp:86:20: note: ‘mshadow::Tensor<mshadow::cpu, 2, float>’ is not derived from ‘const mshadow::expr::TransposeExp<TA, DType>’ AdotW = dot(A,w,1); ^ In file included from /home/marco/mshadow-master/mshadow/tensor.h:17:0, from tensorConstruction.cpp:2: /home/marco/mshadow-master/mshadow/./expression.h:235:1: note: candidate: template<class TA, class TB, class DType> mshadow::expr::DotExp<TA, TB, false, true, DType> mshadow::expr::dot(const mshadow::expr::RValueExp<TA, DType>&, const mshadow::expr::TransposeExp<TB, DType>&) dot(const RValueExp<TA, DType> &lhs, const TransposeExp<TB, DType> &rhs) { ^ /home/marco/mshadow-master/mshadow/./expression.h:235:1: note: template argument deduction/substitution failed: tensorConstruction.cpp:86:20: note: ‘mshadow::Tensor<mshadow::cpu, 1>’ is not derived from ‘const mshadow::expr::TransposeExp<TB, DType>’ AdotW = dot(A,w,1); ^ In file included from /home/marco/mshadow-master/mshadow/tensor.h:17:0, from tensorConstruction.cpp:2: /home/marco/mshadow-master/mshadow/./expression.h:241:1: note: candidate: template<class TA, class TB, class DType> mshadow::expr::DotExp<TA, TB, true, true, DType> mshadow::expr::dot(const mshadow::expr::TransposeExp<TA, DType>&, const mshadow::expr::TransposeExp<TB, DType>&) dot(const TransposeExp<TA, DType> &lhs, const TransposeExp<TB, DType> &rhs) { ^ /home/marco/mshadow-master/mshadow/./expression.h:241:1: note: template argument deduction/substitution failed: tensorConstruction.cpp:86:20: note: ‘mshadow::Tensor<mshadow::cpu, 2, float>’ is not derived from ‘const mshadow::expr::TransposeExp<TA, DType>’ AdotW = dot(A,w,1);

szha commented 5 years ago

This code base has been donated to the Apache MXNet project per #373, and repo is deprecated. Future development and issue tracking should continue in Apache MXNet.