Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Meta-learning training methods #11

Open
yefeng23323 opened this issue Apr 11, 2024 · 5 comments
Open

Meta-learning training methods #11

yefeng23323 opened this issue Apr 11, 2024 · 5 comments

Comments

@yefeng23323
Copy link

Hi, I have not been able to figure out the exact training process of meta-learning, can you explain it for me. Here is my understanding and some questions:

Take poscal voc dataset as an example:
First of all meta learning is divided into support set and query set, then the pascal base class is divided into multiple tasks, each task has a corresponding support set and query set, what I understand is that first the pictures from the support set are put one by one into the branch below in the graph, then the class prototype is trained, then each task comes up with the class prototype, how is it ultimately consolidated into a class prototype? Then the whole model is trained after going the branch above in the graph with the images from the query set, the query set loss for each task adds up to the meta loss, and then the whole model is updated.

I see that the FFA module query image in your text incorporates a support set of finesse prototypes, so I think I misunderstood the training process of meta-learning. So can you elaborate the whole training process (from which step the meta loss is calculated and what is updated at the same time) using psacl voc as an example.

Hope to get your help, thanks a lot!
Thanks

@wangchen1801
Copy link
Owner

哈喽同学,模型包括query和support两个分支,整个模型是可以端到端直接训练的。support分支中,模型会为每个类别图像(support image)都生成一个prototype,它们用于计算meta loss(分类任务,交叉熵损失)。不同类别的prototypes并不会融合而成为一个。最后,这些prototypes与query分支融合,用于辅助目标检测任务。

@wangchen1801
Copy link
Owner

FFA模块则是新加的一个模块,它可以额外地提取"fine-grained prototypes",融合到query分支当中,这部分和meta loss没有关系。

@yefeng23323
Copy link
Author

哈喽,感谢你的回复,就是我有点不太懂原学习整个训练过程,下面是我自己理解的元学习训练过程(应该有很多问题,与很多图对应不上,希望能帮助解答一下):
首先分成跟多个小任务,每个任务包括支持集和查询集,先用支持集的每张图片依次进入模型训练类原型,这里类原型我理解的就是一个可学习嵌入(二维张量),也就是每个task对应一个临时模型,然后一个epoch包含很多个小task,然后在去用每个task的查询集以及对应的临时模型测量损失,加起来也就是元损失,用这个元损失再去更新整个模型以及类原型。这就是一个epoch

根据你的论文图f就是在一阶段训练模型的时候会同时将支持集图片和查询集图片同时放入模型吗,还是先用支持集的图片一张一张的放入训练。如果以pascol voc 数据集为类,元学习会将基类分成很多个小任务,每个任务包括支持集和查询集以及一共5个类,能不能说一下具体的训练过程。

@wangchen1801
Copy link
Owner

支持集图片和查询集图片是同时放入模型的,两条分支平行地工作。按照我的理解,这里的元学习方法与一般深度学习方法,区别主要在模型结构上,并没有多个任务之说。如果需要了解具体的训练流程,可能得从代码中找一下了~

@yefeng23323
Copy link
Author

如果一起的话,是四张图片同时进入吗(假设3类,支持集也就3张图片,与论文图中对应)?然后那个类原型是怎么去计算元损失的呢,就是把类原型进行全连接分类计算交叉熵?,这个类元型从代码的角度讲可以理解成一个嵌入吗?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants