We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
for it, (img, lb_id) in enumerate(dl): print('\r=======> processing iter {} / {}'.format(it, all_iter_nums), end = '', flush = True) label_ids.append(lb_id) #label_cams.append(lb_cam) embds = [] for im in img: im = im.cuda() embd = model(im).detach().cpu().numpy() #通过网络生成特征向量 embds.append(embd) embed = sum(embds) / len(embds) embeddings.append(embed)
请问代码为什么每次要把一个batch的特征求和除去长度
The text was updated successfully, but these errors were encountered:
I think there is a problem too.
Sorry, something went wrong.
I guess the author wanted to sum up the embeddings of ten crops of 1 image rather than a batch of 32 images.
No branches or pull requests
请问代码为什么每次要把一个batch的特征求和除去长度
The text was updated successfully, but these errors were encountered: