You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My feat_query mat has size 18732128 and feat_test. has size 3368128
Error:
Error using *
Incorrect dimensions for matrix multiplication. Check that the number of columns in the first matrix matches
the number of rows in the second matrix. To perform elementwise multiplication, use '.*'.
Error in sqdist (line 22)
m = repmat(qmag, pn, 1) + repmat(pmag', 1, qn) - 2*p'*q;
Error in market_evaluation (line 91)
dist = sqdist(Hist_test, Hist_query); % distance calculate with single query. Note that Euclidean distance is
equivalent to cosine distance if vectors are l2-normalized
I tried to take the transpose of the matrixes to solve it but it didn't work.
The sqdist function does the following:
`function m = sqdist(p, q, A)
% SQDIST Squared Euclidean or Mahalanobis distance.
% SQDIST(p,q) returns m(i,j) = (p(:,i) - q(:,j))'*(p(:,i) - q(:,j)).
% SQDIST(p,q,A) returns m(i,j) = (p(:,i) - q(:,j))'*A*(p(:,i) - q(:,j)).
% The Lightspeed Matlab toolbox
% Written by Tom Minka
[d, pn] = size(p);
[d, qn] = size(q);
if pn == 0 || qn == 0
m = zeros(pn,qn);
return
end
if nargin == 2
pmag = col_sum(p .* p);
qmag = col_sum(q .* q);
m = repmat(qmag, pn, 1) + repmat(pmag', 1, qn) - 2*p'*q;
% m = ones(pn,1)*qmag + pmag'*ones(1,qn) - 2*p'*q;
else
Ap = A*p;
Aq = A*q;
pmag = col_sum(p .* Ap);
qmag = col_sum(q .* Aq);
m = repmat(qmag, pn, 1) + repmat(pmag', 1, qn) - 2*p'*Aq;
end
`
Anything helps, thank you
The text was updated successfully, but these errors were encountered:
I got a matrix dimmension error when I try to evaluate the performance of the model.
How can I solve it? What should be the size of the dist ?
I used the following code for the evaluation of market1501 : https://codeload.github.com/HejaBVB09/Market1501Evaluation/zip/master
A repository for that code: https://github.com/DemacianPrince/Market1501Evaluation
My feat_query mat has size 18732128 and feat_test. has size 3368128
Error:
I tried to take the transpose of the matrixes to solve it but it didn't work.
The sqdist function does the following:
`
Anything helps, thank you
The text was updated successfully, but these errors were encountered: