TencentYoutuResearch / PersonReID-NAFS

Code for "Contextual Non-Local Alignment over Full-Scale Representation for Text-Based Person Search"
https://arxiv.org/abs/2101.03036
Other
61 stars 10 forks source link

bert-base-uncased-vocab.txt' not found in model shortcut name list #9

Closed yyll1998 closed 3 years ago

yyll1998 commented 3 years ago

I have downloaded pretrained Resnet50 model, bert-base-uncased model and vocabulary to project_directory/pretrained/.But when i run train.sh,it showed that '../pretrained/bert-base-uncased/bert-base-uncased-vocab.txt not found in model shortcut name list''.I attach the picture of the problem,please take a look at the problem. Is it a problem with the file directory structure?Great thanks if get your help! image

wettera commented 3 years ago

Thanks for your attention on our work. Please first run cd project_directory/scripts. Then run sh train.sh. If it doesn't work, please change self.tokenizer = BertTokenizer.from_pretrained('../pretrained/bert-base-uncased/bert-base-uncased-vocab.txt') modelConfig = BertConfig.from_pretrained('../pretrained/bert-base-uncased/bert_config.json') self.textExtractor = BertModel.from_pretrained( '../pretrained/bert-base-uncased/pytorch_model.bin', config=modelConfig) in models/bert.py to the absolute path.

yyll1998 commented 3 years ago

Thank you for your reply! Under your guidance, I have solved this problem! Due to my mistake, I deleted the issues on gitbub by mistake. I'm very sorry! Thank you again!

At 2021-03-07 21:05:08, "wettera" @.***> wrote:

Thanks for your attention on our work. Please first run cd project_directory/scripts. Then run sh train.sh. If it doesn't work, please change self.tokenizer = BertTokenizer.from_pretrained('../pretrained/bert-base-uncased/bert-base-uncased-vocab.txt') modelConfig = BertConfig.from_pretrained('../pretrained/bert-base-uncased/bert_config.json') self.textExtractor = BertModel.from_pretrained( '../pretrained/bert-base-uncased/pytorch_model.bin', config=modelConfig) in models/bert.py to the absolute path.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.