GithubHelp home page GithubHelp logo

Global query: wrong repeating about gcvit HOT 5 CLOSED

nvlabs avatar nvlabs commented on August 17, 2024
Global query: wrong repeating

from gcvit.

Comments (5)

pamolchanov avatar pamolchanov commented on August 17, 2024 2

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.

ahatamiz avatar ahatamiz commented on August 17, 2024

@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.

shkarupa-alex avatar shkarupa-alex commented on August 17, 2024

@ahatamiz you can reproduce issue in such way:

  1. Add "import numpy as np" at the top of https://github.com/NVlabs/GCVit/blob/main/models/gc_vit.py
  2. 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]
  1. Run evaluation with any batch size > 1 multiple times

You will always get different top1 and top5 accuracy

from gcvit.

tridao avatar tridao commented on August 17, 2024

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.

ahatamiz avatar ahatamiz commented on August 17, 2024

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)

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.