Code Monkey home page Code Monkey logo

mixvit's Issues

载入预训练权重报错

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文件导入预训练权重,然后报错

CUB数据集上复现报错

在使用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'"
请问是什么情况呢?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.