msight-tech / research-xbm Goto Github PK
View Code? Open in Web Editor NEWXBM: Cross-Batch Memory for Embedding Learning
License: Other
XBM: Cross-Batch Memory for Embedding Learning
License: Other
CUDA_VISIBLE_DEVICES=0 python3 tools/train_net.py --cfg configs/sample_config.yaml
Traceback (most recent call last):
File "tools/train_net.py", line 81, in
train(cfg)
File "tools/train_net.py", line 64, in train
criterion, checkpointer, writer, device, checkpoint_period, arguments, logger,)
File "/home/shengyang/work/hg-git/HS/research-xbm/ret_benchmark/engine/trainer.py", line 74, in do_train
scheduler.step(log_info[f"R@1"])
KeyError: 'R@1'
torch: 1.4.0
GTX 1080ti
what's wrong with it?
Thank your for your amamzing work!
In my experiment, the xbm loss keep getting bigger. Could you share the training log?
Thank you for sharing the code.
Now I'm using CUB200 for training, but the maximum R@1 is always around 60. I don't know how to adjust the parameters and choose loss. Do you have any Suggestions?
Thank you very much
if I enable xbm loss ,It is show that loss will above 2000,is nomal?
请问在ms损失中,hard_mining时调用torch.min(pos_pair_)时,pos_pair_有时长度为0报错怎么办
xbm_loss的权重的权重设置为1 这样原来的loss=loss 现在的loss=loss+xbm_loss ,在1000轮的时候是不是会发生loss升高的现象
Thank you for sharing the code. Which data set is your preset parameter suitable for? At present, the data set I use has performance degradation during the training process.
请问你试过softmax+triplet吗,在我代码里没有提升,不知道是啥原因?
我代码里用的 softmax+triplet+xbm(triplet)
Hi!
Thanks for releasing this repo!
I wanted to let you know that I am pretty sure there is a mistake in the implementation of mAP@R:
Line 35, you divide by max_possible_matches_per_row for this query (which is R).
But what should be done is divide by the actual number of relevant items in the R-best-ranked ones.
see wikipedia page on AP:
I also wrote some tests against the sklearn implem of AP (I can send them if needed).
This mistake seems to also be present in the repo of 'Deep metric learning reality check' with very similar code, I'm not sure who was inspired from who, but I will open an issue there too.
Regards,
A
The code has abandoned the strategy of updating memory, such as 'Moving Average Update'?
Thanks for sharing the code. However, the code has one error: "AssertionError: path for train.txt NOT found."
It seems that the data path is not provided. Could you give some references or explanations on the data preparation?
Hi. Thanks for the good resource!!
I have a question about train.txt/test.txt file format.
Pardon me, can you provide a path text file format or some examples of that?
thank you.
I wonder if someone knows of a multi-GPU implementation of XBM?
Hi all,
The best e_precision_recall_at_1 I can achieve is about 75, which is different from 80.6 reported in the paper. According to the given configurations of SOP in the paper, I set the memory ratio to 1, the initial learning rate to 3e-4 which is multiplied by 0.1 after 24k iterations, and the number of total iterations to 34k. The other configurations are given as follows
Did you come across the same issue? Any advice will be appreciated!
Hi, I am trying to reproduce the result of In shop image retrieval in your paper. However, I only got 0.874 (vs 0.913 in the paper) in terms of recall@1 (which seems to be referred as precision@1 in the code). Attached is my config file, my change of 'trainer.py' (so that it allows to input query and gallery set) and my data preparation code.
code link here
Thank you very much.
在do_train里必须用detach截断feats和targets吗?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.