markin-wang / mixvit Goto Github PK
View Code? Open in Web Editor NEW[Pattern Recognition] Mix-ViT: Mixing Attentive Vision Transformer for Ultra-Fine-Grained Visual Categorization.
[Pattern Recognition] Mix-ViT: Mixing Attentive Vision Transformer for Ultra-Fine-Grained Visual Categorization.
model.load_from(np.load(args.pretrained_dir))
File "F:\Code\FGVC\MixViT-main\models\make_model.py", line 71, in load_from
self.vit.load_from(weights)
File "F:\Code\FGVC\MixViT-main\models\modeling.py", line 520, in load_from
unit.load_from(weights, n_block=uname)
File "F:\Code\FGVC\MixViT-main\models\modeling.py", line 229, in load_from
query_weight = np2th(weights[pjoin(ROOT, ATTENTION_Q, "kernel")]).view(self.hidden_size, self.hidden_size).t()
File "D:\ProgramData\Anaconda3\lib\site-packages\numpy\lib\npyio.py", line 260, in getitem
raise KeyError("%s is not a file in the archive" % key)
KeyError: 'Transformer/encoderblock_0\MultiHeadDotProductAttention_1/query\kernel is not a file in the archive'
Resized position embedding from size:torch.Size([1, 197, 768]) to size: torch.Size([1, 6, 768]) with height:5 width: 1
数据集用的网盘里面的数据集,soyloc,按照sh文件导入预训练权重,然后报错
在使用MixViT-main/scripts/train_cub.sh复现mixvit时会报错:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/ml_collections/config_dict/config_dict.py", line 883, in getitem
field = self._fields[key]
KeyError: 'resnet'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/ml_collections/config_dict/config_dict.py", line 807, in getattr
return self[attribute]
File "/usr/local/lib/python3.6/dist-packages/ml_collections/config_dict/config_dict.py", line 889, in getitem
raise KeyError(self._generate_did_you_mean_message(key, str(e)))
KeyError: "'resnet'"
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/data/private/MixViT-main/train.py", line 458, in
main()
File "/opt/data/private/MixViT-main/train.py", line 451, in main
args, model = setup(args)
File "/opt/data/private/MixViT-main/train.py", line 102, in setup
model = make_model(config, args, zero_head=True, num_classes=num_classes, vis=True)
File "/opt/data/private/MixViT-main/models/make_model.py", line 94, in make_model
model = build_transformer(config, args, zero_head=True, num_classes=num_classes, vis=True)
File "/opt/data/private/MixViT-main/models/make_model.py", line 43, in init
self.inter_arch = ResNetV2(block_units=config.resnet.num_layers,
File "/usr/local/lib/python3.6/dist-packages/ml_collections/config_dict/config_dict.py", line 809, in getattr
raise AttributeError(e)
AttributeError: "'resnet'"
请问是什么情况呢?
Hello, I appreciate your work very much. Can you open source the attention visualization part of the code?
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.