Skip to content
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

ValueError: zero-dimensional arrays cannot be concatenated #2

Open
chj1933 opened this issue Aug 14, 2018 · 11 comments
Open

ValueError: zero-dimensional arrays cannot be concatenated #2

chj1933 opened this issue Aug 14, 2018 · 11 comments

Comments

@chj1933
Copy link

chj1933 commented Aug 14, 2018

when I run sh demo.sh
[INFO] Making loss...
1.000 * CrossEntropy
1.000 * Triplet
[INFO] Epoch: 1 Learning rate: 2.00e-04

[INFO] Test:
Traceback (most recent call last):
File "main.py", line 22, in
trainer.test()
File "/media/data2/chenghj/RE-ID/MGN-pytorch-master/trainer.py", line 74, in test
dist = re_ranking(q_g_dist, q_q_dist, g_g_dist)
File "/media/data2/chenghj/RE-ID/MGN-pytorch-master/utils/re_ranking.py", line 44, in re_ranking
[np.concatenate([q_q_dist, q_g_dist], axis=1),
ValueError: zero-dimensional arrays cannot be concatenated

please tell me how to correct it . thanks!

@seathiefwang
Copy link
Owner

can you show me your demo.sh file? it is ok when i run it.

@chj1933
Copy link
Author

chj1933 commented Aug 15, 2018

@seathiefwang ,if I want to use my own dataset , how to train it?

@seathiefwang
Copy link
Owner

You need to write code to parse your data.

@chj1933
Copy link
Author

chj1933 commented Aug 15, 2018

@seathiefwang , If i use my own dataset , It's appropriate what parameters should I usually adjust?

@seathiefwang
Copy link
Owner

--datadir you need modify this parameter.

@chj1933
Copy link
Author

chj1933 commented Aug 16, 2018

@seathiefwang ,thanks! It works when I use my own dataset , but the mAP and rank1 are not very high , if I want to improve the mAP and rank1, It's appropriate what parameters should I usually adjust?

@seathiefwang
Copy link
Owner

#1

@chj1933
Copy link
Author

chj1933 commented Aug 17, 2018

@seathiefwang ,please tell me how are your training parameters set?I always lower 1% than your, it can't achieve rank1 95.8% and mAP 93.5%

@chj1933
Copy link
Author

chj1933 commented Aug 18, 2018

@seathiefwang , why is lower when I use 4 GPUS than 2 GPUS, other parameters remain the same

@seathiefwang
Copy link
Owner

You can change parameters and try more times.

@chj1933
Copy link
Author

chj1933 commented Sep 19, 2018

@seathiefwang ,你好,若果我用自己的数据训练,我在解析自己的数据时候除了修改(market1501.py)把ID信息和摄像头信息导入,还要修改哪里嘛?不然会在dist = cdist(qf,gf)显示XA must be a 2-dimensional array

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants