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

test #13

Open
chj1933 opened this issue Jul 18, 2019 · 5 comments
Open

test #13

chj1933 opened this issue Jul 18, 2019 · 5 comments

Comments

@chj1933
Copy link

chj1933 commented Jul 18, 2019

when I test, there is a error, ValueError: expected 2D or 3D input (got 1D input), please tell me how should I do.

@wzjiang
Copy link

wzjiang commented Jul 19, 2019

我也遇到一样的问题,在market1501,cuhk不会,在clothes就会

@chj1933
Copy link
Author

chj1933 commented Jul 30, 2019

@wzjiang ,请问你是怎样处理 ValueError: expected 2D or 3D input (got 1D input)?

@liqb-a
Copy link

liqb-a commented Aug 14, 2019

出现这个的原因是 batch为1(测试batch_size为1 或者 最后一批图片个数为1);根本原因是因为作者在搭建网络的时候有做压缩处理,维度大小为1的都会被压缩。
修改:
1、修改网络,压缩增加判断,如果维度为1在扩维。
2、更改batch_size和测试图片个数(让batch不为1即可)

@YunhaoDu
Copy link

YunhaoDu commented Mar 5, 2020

@liqb-a 经过测试,发现batch_size<=3就会报这个错误;请问源码中是在哪里进行的压缩处理呢?怎么去修改呢?

@yukaizhou
Copy link

我也遇到了这个问题,是因为网络(network.py)中使用.squeeze进行维度压缩,导致在batchsize为1时,batchsize的维度也没干掉了,使用view改写下就可以了。使用给的模型结果是85.5和94.6%。

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

5 participants