-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
error occurs while training #333
Comments
any more info? like command to reproduce your error? did you make any change to the source code? |
Hello KaiyangZhou. I encountered the same problem. The result is:
I didn't change the source code. I just do as the guide says, no additional command. My running code is:
My system is Windows10, pytorch 1.1.0, cudatoolkit 9.0. Because Windows system ,I have to change some code compared to the get-started-30-seconds, or there will be error described as #issues21114. |
seems to be a problem for windows I can't reproduce the error without a windows machine, maybe @berkdenizi has solved the issue? |
I solved but idk how . i played on some codes long time ago .. @KaiyangZhou @darcyzhc |
Thanks for your reply, berkdenizi. Could you remember how did you solve this problem? |
I also have this problem and my environment is windows. @berkdenizi , How did you solve it? |
I figure out a workaround about this problem. You can prohibit the use of |
And I get the workable solution now. As described in #160:
|
Epoch: [10/60][400/404] Time 0.173 (0.188) Data 0.000 (0.011) Loss 1.6979 (1.5605) Acc 81.25 (91.09) Lr 0.000300 eta 1:03:19
Evaluating market1501 (source)
Extracting features from query set ...
Done, obtained 3368-by-2048 matrix
Extracting features from gallery set ...
Done, obtained 15913-by-2048 matrix
Speed: 0.0211 sec/batch
Computing distance matrix with metric=euclidean ...
Computing CMC and mAP ...
"ValueError Traceback (most recent call last)
in
4 eval_freq=10,
5 print_freq=10,
----> 6 test_only=False
7 )
~\Desktop\deep-person-reid-master\deep-person-reid-master\torchreid\engine\engine.py in run(self, save_dir, max_epoch, start_epoch, print_freq, fixbase_epoch, open_layers, start_eval, eval_freq, test_only, dist_metric, normalize_feature, visrank, visrank_topk, use_metric_cuhk03, ranks, rerank)
141 save_dir=save_dir,
142 use_metric_cuhk03=use_metric_cuhk03,
--> 143 ranks=ranks
144 )
145 self._save_checkpoint(epoch, rank1, save_dir)
~\Desktop\deep-person-reid-master\deep-person-reid-master\torchreid\engine\engine.py in test(self, epoch, dist_metric, normalize_feature, visrank, visrank_topk, save_dir, use_metric_cuhk03, ranks, rerank)
225 use_metric_cuhk03=use_metric_cuhk03,
226 ranks=ranks,
--> 227 rerank=rerank
228 )
229
~\anaconda3\envs\torchreid\lib\site-packages\torch\autograd\grad_mode.py in decorate_no_grad(*args, **kwargs)
47 def decorate_no_grad(*args, **kwargs):
48 with self:
---> 49 return func(*args, **kwargs)
50 return decorate_no_grad
51
~\Desktop\deep-person-reid-master\deep-person-reid-master\torchreid\engine\engine.py in _evaluate(self, epoch, dataset_name, query_loader, gallery_loader, dist_metric, normalize_feature, visrank, visrank_topk, save_dir, use_metric_cuhk03, ranks, rerank)
300 q_camids,
301 g_camids,
--> 302 use_metric_cuhk03=use_metric_cuhk03
303 )
304
~\Desktop\deep-person-reid-master\deep-person-reid-master\torchreid\metrics\rank.py in evaluate_rank(distmat, q_pids, g_pids, q_camids, g_camids, max_rank, use_metric_cuhk03, use_cython)
199 return evaluate_cy(
200 distmat, q_pids, g_pids, q_camids, g_camids, max_rank,
--> 201 use_metric_cuhk03
202 )
203 else:
~\Desktop\deep-person-reid-master\deep-person-reid-master\torchreid\metrics\rank_cylib\rank_cy.pyx in torchreid.metrics.rank_cylib.rank_cy.evaluate_cy()
22
23 # Main interface
---> 24 cpdef evaluate_cy(distmat, q_pids, g_pids, q_camids, g_camids, max_rank, use_metric_cuhk03=False):
25 distmat = np.asarray(distmat, dtype=np.float32)
26 q_pids = np.asarray(q_pids, dtype=np.int64)
~\Desktop\deep-person-reid-master\deep-person-reid-master\torchreid\metrics\rank_cylib\rank_cy.pyx in torchreid.metrics.rank_cylib.rank_cy.evaluate_cy()
30 if use_metric_cuhk03:
31 return eval_cuhk03_cy(distmat, q_pids, g_pids, q_camids, g_camids, max_rank)
---> 32 return eval_market1501_cy(distmat, q_pids, g_pids, q_camids, g_camids, max_rank)
33
34
ValueError: Buffer dtype mismatch, expected 'long' but got 'long long'"
The text was updated successfully, but these errors were encountered: