Coder Social home page Coder Social logo

Accuracy of CAN Method about libfewshot HOT 4 CLOSED

rl-vig avatar rl-vig commented on July 29, 2024
Accuracy of CAN Method

from libfewshot.

Comments (4)

wZuck avatar wZuck commented on July 29, 2024

Thank you for reporting this issue. You can modify line 327 to

acc = accuracy(cls_scores, query_targets.view(-1), topk=1)

We will update can.py later.

And CAN uses episodic-tasks in both the training and testing stage, so batch_size is useless in this method, you can set episode_size for training/testing/debugging.

If you are using the main branch of LibFewShot, you will get the episode_size = episode_size. If you are using the add_ddp branch of LibFewShot, you will only get the episode_size = episode_size / n_gpu.

from libfewshot.

viviGeng avatar viviGeng commented on July 29, 2024

Thank you for your reply.
I have another question about the shape of input data with different parameter setting.
For training CAN model using miniImageNet, set batch_size = 32 episode_size = 1 n_gpu = 1, then the shape of input data is [100,3,84,84]. If we change the setting as batch_size = 128 episode_size = 1 n_gpu = 1, then the shape of input data is [80,3,84,84].
It seems the first element of shape array is somehow relevant to batch_size. Could you give me some suggestion about how to set those parameters appropriately.

from libfewshot.

wZuck avatar wZuck commented on July 29, 2024

Could you upload your config of 2 different settings? It's better if you can upload the config.yaml in the checkpoint's directory.

CAN-miniImageNet--ravi-Conv64F-5-1-XXXXXXXXXXXX
├── checkpoints
├── config.yaml        # <- this file
└── log_files

You may set shot/test_shot to different values accidentally. Beacause 100 = 5way * (5shot+15query) and 80 = 5way * (1shot+15query)

from libfewshot.

viviGeng avatar viviGeng commented on July 29, 2024

Thank you for the explanation.
The difference is caused by value of shot.

from libfewshot.

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.