markin-wang / ffvt Goto Github PK
View Code? Open in Web Editor NEW[BMVC 2021] The official PyTorch implementation of Feature Fusion Vision Transformer for Fine-Grained Visual Categorization
License: Other
[BMVC 2021] The official PyTorch implementation of Feature Fusion Vision Transformer for Fine-Grained Visual Categorization
License: Other
I wanted to load the pretrained weights but on specifying --pretrained_dir as the absolute path of the weights file: soyloc.bin, I get the following error:
WARNING - main - Process rank: -1, device: cuda, n_gpu: 1, distributed training: False, 16-bits training: False
Traceback (most recent call last):
File "/FFVT-main/train.py", line 416, in
main()
File "/home/code/classifiers/FFVT-main/train.py", line 409, in main
args, model = setup(args)
File "/FFVT-main/train.py", line 93, in setup
model.load_from(np.load(args.pretrained_dir, allow_pickle=True))
File "/FFVT-main/models/modeling.py", line 379, in load_from
self.transformer.embeddings.patch_embeddings.weight.copy_(np2th(weights["embedding/kernel"], conv=True))
TypeError: 'int' object is not subscriptable
And when I try to load weights I generated(--pretrained_dir= my_ckpt.bin) after training with a custom dataset I get:
Traceback (most recent call last):
File "/FFVT-main/train.py", line 416, in
main()
File "/FFVT-main/train.py", line 409, in main
args, model = setup(args)
File "/FFVT-main/train.py", line 93, in setup
model.load_from(np.load(args.pretrained_dir, allow_pickle=True))
File "/FFVT-main/models/modeling.py", line 379, in load_from
self.transformer.embeddings.patch_embeddings.weight.copy_(np2th(weights["embedding/kernel"], conv=True))
File "/PyEnvs/base/lib/python3.8/site-packages/numpy/lib/npyio.py", line 260, in getitem
raise KeyError("%s is not a file in the archive" % key)
KeyError: 'embedding/kernel is not a file in the archive'
The vit-b_16
Thank you for this awesome work.
I'm getting a problem when using the training script. The problem is related with apex, can you include a command how to install it properly (I tried to do it with pip but it doesn't work)
Have a nice day
Hi, Thanks for your excellent work, i have a question, how many steps did you train on each dataset? and dose the batchsize you mentioned in your paper refer to a single GPU?
Thank you!
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.