mxnet-insightface-cpp
mxnet-insightface-cpp copied to clipboard
GPU : is this code running on the Gpu also ?
Hi @njvisionpower
I have gpu compiled mxnet. can I run this code on the gpu ? do I need changes ?
@njvisionpower
do you think below code is runs faster in GPU if the db is huge ?
`class_info classify(const cv::Mat& img, const cv::Mat& cmp)
{
int rows = cmp.rows;
cv::Mat broad;
cv::repeat(img, rows, 1, broad);
broad = broad - cmp;
cv::pow(broad,2,broad);
cv::reduce(broad, broad, 1, cv::REDUCE_SUM);
double dis;
cv::Point point;
cv::minMaxLoc(broad, &dis, 0, &point, 0);
return class_info{dis, point.y};
}`