Git Product home page Git Product logo

fewshot-can's People

Contributors

blue-blue272 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

fewshot-can's Issues

a question about residual attention mechanism

in the residual attention mechanism,the initial feature maps P and Q are elementwisely weighted by 1 + A^p and 1 + A^q.
I guess that the linef1 = f1.unsqueeze(2) * a1.unsqueeze(3)in cam.py is the elementwisely weighted operation.
However I can't find the operation of (1+) in your code.

I am deeply inspired by the excellent programming of this project. Thanks for your kindly sharing and look forward to your early reply.

a question about meta learner

Dear author, can ask you about which parts of your code cam.py is about meta learner to achieve?
Thank you for your time reading my issues. Best wishes!

关于如何跑代码的问题

您好
您的代码很简洁,方法的效果也很好,效果也是sota。但是我想问问该如何运行您的程序,需要配置什么环境,因为您好像没有说明该如何跑程序,谢谢。

tiered Imagenet dataset

I have downloaded Imagenet dataset (~140GB) then ran tiered imagenet tools on it to build the tiered imagent dataset, but it's not loading properly in your code. The error I am getting is the following:

`Initializing dataset tieredImageNet
=> tieredImageNet loaded
Dataset statistics:

subset | # cats | # images

train | 0 | 0
val | 0 | 0
test | 0 | 0

total | 0 | 0

Traceback (most recent call last):
File "train.py", line 188, in
main()
File "train.py", line 53, in main
dm = DataManager(args, use_gpu)
File "/home/sargsyan/fewshot-CAN/torchFewShot/data_manager.py", line 81, in init
load=args.load,
File "./torchFewShot/dataset_loader/init.py", line 21, in init_loader
return __loader_factory[name](*args, **kwargs)
File "./torchFewShot/dataset_loader/test_loader.py", line 74, in init
Tnovel, Exemplar = self._sample_episode()
File "./torchFewShot/dataset_loader/test_loader.py", line 88, in _sample_episode
Knovel = random.sample(self.labelIds, self.nKnovel)
File "/home/sargsyan/anaconda3/envs/pytorch/lib/python3.6/random.py", line 320, in sample
raise ValueError("Sample larger than population or is negative")
ValueError: Sample larger than population or is negative`

Could you please point me how you built the dataset you used, or provide access to the dataset?

Thank you.

some questions about classifier layer for the model

Dear auther
there is some question in my mind: in the train stage, the num_classes is 64 which is the number of the miniImageNet_train.pickle, however, when i use the test.py to evaluate my model ,the num_classes is still 64 in the model , I'm a little confused about the few shot model's test principle.
Thank you for your time reading my issues. Best wishes!

数据集问题

您好,请问数据集实在哪里下载呀,就是需要自己把miniImageNet分开在跑实验么?miniImageNet_load.py是干什么的?我下载了您引用的一篇文章的数据集,里面是 .pickle文件有什么用呢?谢谢

pickle 文件

你们的pickle文件是如何划分的啊,可否上传你们的pickle文件啊

关于代码的问题

您好:
您的代码很简洁,方法的效果也是sota。
但是我想请教一下,您在meta-train之前是否在base class上做过预训练呢?我直接运行您提供的train.py(所有参数均未改动),得到的结果只有百分之二十多?不知道是哪里出了问题,希望能得到您的回复,谢谢!

关于数据库的问题

不好意思 再打扰一下,请问
1.数据库的话tieredImageNet和miniImageNet都是从mengye和matchingnet的官网上下载吗?
2.关于下载后的处理,我看到您dataset里面有miniImageNet.py和miniImageNet_load.py,但是他们的路径不一样,然后args_xent.py里面dataset参数为miniImageNet_load,是不是意味着就是读取miniimaget的数据时只用了miniImageNet_load.py?
3.不得不说您的算法真的很简洁很明了,是我们学习的榜样
4.请问一下transductive部分的代码是没有公布吗?
谢谢您的耐心

some problem about trainning miniimagenet.

Thanks for your excellent work! When I train the model on miniimagenet, i only get the accuracy with 78.84%(5-shot), which is lower than your result in your paper。Can you give me some advise to reproduce your result in paper?
1577089624

代码不全,模型损坏。

老哥,十分感谢你能把代码开源。
不过好像缺少了data_manager、losses、optimizers、utils等子文件夹,以及谷歌云盘上的模型下载后无法解压,提示损坏。
能不能麻烦你开源完整的代码,以及检查下模型压缩包?感谢!

An inquiry about the Loss function in train.py line123-125

Hello! While reading the paper associated with the code, I noticed that in the paper (page 5 formula 5 & 6), the L1 is the "nearest neighbor classification loss" while L2 is the "global classification loss", and total loss L = lambda L1 + L2. Whereas in the code line 123-125, it seems to me the losses are a bit mixed up.

123 loss1 = criterion(ytest, pids.view(-1))
124 loss2 = criterion(cls_scores, labels_test.view(-1))
125 loss = loss1 + 0.5 * loss2

I'm wondering why the nearest neighbor classification loss is calculated with ytest and pids, which looks like the global loss.
Thank you for the help!

源码请求

您好,我参照您放出的模型,以及论文里的各个细节自己写了训练代码,但是不能达到论文里强调的精度,请问是否介意放出训练源码,以便我更好的修改细节部分。

Where are the codes for the part of "Transductive Inference" ?

Hi, @blue-blue272!
I think this is an interesting and inspiring work, but in your released code, I don't find the code for "Transductive Inference" as shown in your paper. Maybe I don't find it. Can you point it out for me?
In your released code(default settings in args_xent.py), I also find that you use the test dataset to early stop, I don't think it's appropriate.
Looking forward to your reply!

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.