dqshuai / MetaFormer

A PyTorch implementation of "MetaFormer: A Unified Meta Framework for Fine-Grained Recognition". A reference PyTorch implementation of “CoAtNet: Marrying Convolution and Attention for All Data Sizes”
MIT License
226 stars 40 forks source link

How to generate bert_embedding_cub for cub-200? #7

Closed BakingBrains closed 2 years ago

BakingBrains commented 2 years ago

FileNotFoundError: [Errno 2] No such file or directory: 'D:/dataset/CUB_200_2011\\bert_embedding_cub\\001.Black_footed_Albatross/Black_Footed_Albatross_0046_18.pickle'

dqshuai commented 2 years ago

We used the to https://github.com/huggingface/transformers generate bert embedding. For example, from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("bert-base-uncased") model = AutoModel.from_pretrained("bert-base-uncased").

BakingBrains commented 2 years ago

@dqshuai Thanks a lot, can you please tell on which meta data (in cub-200) should we generate embeddings.pkl file?