Comments (5)
We indeed refactored our internal version of the code and introduced some bugs trying to simplify things. Thanks @tridao @shkarupa-alex for helping to identify those issues. We have fixed them and retraining models to share in the repo. ETA is EOW.
It is worth to mention that current release weights still replicate numbers in the paper. We expect new models to do better.
from gcvit.
@shkarupa-alex Thanks for your comment. I tested it again but get the correct order of images in the batch for both train and validation. We will test again using different Pytorch versions and hardware to ensure consistency.
from gcvit.
@ahatamiz you can reproduce issue in such way:
- Add "import numpy as np" at the top of https://github.com/NVlabs/GCVit/blob/main/models/gc_vit.py
- Add following code after this line https://github.com/NVlabs/GCVit/blob/main/validate.py#L224
batch_size = input.shape[0]
batch_range = np.arange(batch_size, dtype='int32')
np.random.shuffle(batch_range)
input = input[batch_range]
target = target[batch_range]
- Run evaluation with any batch size > 1 multiple times
You will always get different top1 and top5 accuracy
from gcvit.
I ran into the same issue when playing with the current GCViT model code. It does seem that repeating q_global
is mixing examples from different batches.
Perhaps there's an internal version of the model code that's different from this public version?
from gcvit.
Hi @tridao
We have updated our models and re-trained them. In all cases, the accuracy is better compared to reported numbers in the paper, from our internal checkpoints. In addition, we have conducted a set of stress tests and verified there is no inconsistency with the model performance across different batch sizes at test time. Please check the new model weights and let us know if you face any issues.
from gcvit.
Related Issues (20)
- Global query: wrong input transformation HOT 1
- training is slow HOT 5
- is there a large release, please ? HOT 1
- image input for channel changing HOT 3
- Reliable comparison with Swin: fixed window size HOT 1
- training hparam clarifications HOT 3
- x = x.reshape(B, 1, self.N, self.num_heads, self.dim_head).permute(0, 1, 3, 2, 4) reshape error!!!! HOT 3
- New third part implementation HOT 2
- Using timm gcvit models and getting errors when using resolution other than 224x224 HOT 2
- Backbone Feature Maps for One-Stage Detectors HOT 5
- Validate using public checkpoint, Accuracy extremely low HOT 4
- Is there any documentation to train a semantic segmentation model using a custom dataset? HOT 3
- Hi, Where can I download GC_ViT-B_384 pretrained weight ? HOT 6
- Third-Party JAX/Flax implementation HOT 2
- How to use "--input-size" properly? HOT 2
- Getting an error for the output shape for each stage in GC ViT
- Getting an error for the output shape for each stage in GC ViT HOT 1
- Shape errors in data loading when using train.py HOT 1
- Could anyone help me with the data loading process? HOT 1
- How to Visualize the global attention, as shown in Figure 1? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gcvit.