Giter Club home page Giter Club logo

Comments (5)

wZuck avatar wZuck commented on July 26, 2024

Hi, could you try to run the model with following config?

way_num: 5
shot_num: 4
query_num: 1

from libfewshot.

Akutchi avatar Akutchi commented on July 26, 2024

It now works, I guess it was really just a configuration problem. Can you provide me an insight on why 15 doesn't work but 1 does ?
Many thanks.

EDIT :
or so I thought. I does indeed go through the training, validation and test steps, but those finished I have a similar error with
shape '[1, 5, 5]' is invalid for input of size 5

I have reduced my config file to

includes:
  - headers/dataZSL.yaml
  - headers/device.yaml
  - headers/misc.yaml
  - headers/model.yaml
  - headers/optimizer.yaml
  - classifiers/Proto.yaml
  - backbones/Conv64F.yaml

way_num: 5
shot_num: 4
query_num: 1

backbone:
  name: Conv64F
  kwargs:
    is_flatten: True
    is_feature: False
    leaky_relu: False
    negative_slope: 0.2
    last_pool: True

from libfewshot.

wZuck avatar wZuck commented on July 26, 2024

The train.csv is used to sample training support sets and query sets. So the shot_num+query_num must be larger than the number of images in each class. When you set shot_num+query=20, only 5 images of each class are sampled in sampler.py, we do not check out-of-bound settings for it.

Additionally, you may misunderstand the dataset structure. The test.csv is only used to sample support sets and query sets in the few-shot meta-testing stage. In common, the set of classes in train.csv is disjointed with the classes in test.csv.

from libfewshot.

wZuck avatar wZuck commented on July 26, 2024

In the testing stage, your test.csv contains only one sample in each class, so the test_shot+test_query > 1. (In default, when test_* is not specified, the *_num will replace it).

from libfewshot.

Akutchi avatar Akutchi commented on July 26, 2024

Oh, I see.
I have changed the number of examples per classes in the test set and it does work.
I won't deny that I may have misunderstood the dataset structure.
Thank you for your time

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.