Comments (5)
Hi, could you try to run the model with following config?
way_num: 5
shot_num: 4
query_num: 1
from libfewshot.
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.
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.
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.
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)
- Request more algorithm re-implementation parameter settings
- batch = torch.stack(batch).reshape(-1) HOT 2
- CAN模型的特征维度不匹配 HOT 1
- 检测结果可视化 HOT 3
- verbose HOT 6
- hyperspectral images HOT 1
- How to set syncbn in this codebase HOT 1
- CUB Dataset issue HOT 1
- Suggest to support Semi-supervised and Unsupervised FSL method in the future HOT 1
- 你好,config/headers下面是不是没有losses.yaml文件 HOT 1
- Protonet HOT 3
- TypeError: __init__() missing 1 required positional argument: 'config' HOT 3
- 自己的单个数据是二维的 及类别 可以使用few shot 分类吗? HOT 3
- Questions about using the given dataset for training(such as miniImagenet) and using my own dataset for testing! HOT 5
- LibFewShot学习使用过程中的一些困惑。 HOT 1
- turn off test during training HOT 2
- Very amazing work. But loses.yaml is missing under config/headers! HOT 3
- FileNotFoundError: [Errno 2] No such file or directory: './config/backbones/Conv64FLeakyReLU.yaml' HOT 3
- 在miniImageNet数据集上运行RENet等报错 HOT 9
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 libfewshot.