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

RandomIdentitySampler #1

Open
kli-casia opened this issue Aug 18, 2018 · 1 comment
Open

RandomIdentitySampler #1

kli-casia opened this issue Aug 18, 2018 · 1 comment

Comments

@kli-casia
Copy link

kli-casia commented Aug 18, 2018

https://github.com/xiaolai-sqlai/gluon-reid/blob/master/branch/data_read/sampler.py#L35
这里的len是不是应该返回self.num_samples?也就是_iter_函数中ret的长度

我看https://mxnet.incubator.apache.org/_modules/mxnet/gluon/data/sampler.html#BatchSampler
batchsampler的源码返回的是batch的数目

@xiaolai-sqlai
Copy link
Owner

这是为了保持数目一致,因为我们最后一个batch只采751个id,每个id共计4张图片,故而要len和这个统一,不然在训练中,就会出现iter才跑了一半,整个epoch直接结束跳入下一个epoch的情况,主要是为了保证统一。

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