tata1661 / fsl-mate Goto Github PK
View Code? Open in Web Editor NEWFSL-Mate: A collection of resources for few-shot learning (FSL).
FSL-Mate: A collection of resources for few-shot learning (FSL).
In the suggested structuring python project, there are some conventional structures & files & naming-style to make the project more readable and scalable. And what's more, there are some github Action tools to run CI to lint & test code, run CD to publish the project.
I also maintain the project: python-wechaty and paddle-prompt. So I'm familiar with the related opensource toolkits in python project. I can create an another pr to complete this If you agree with it ? How do you think about it ? @tata1661
Maybe you can update to contain a paper entitled Context-Transformer: Tackling Object Confusion for Few-shot Detection.
There are some unused files in the project, eg:.DS_Store
file and __pycache__
directory.
You have set the configuration to ignore .DS_Store
file, but it only ignore the file under the top directory of project which is disable for another .DS_Store
files. So as the __pycache__
directory.
【队名】:青葱岁月夏小凡
【序号】:91
【状态】:报名
【链接】:#19
如题.运行examples/relation_classification下两个文件,报错AttributeError: module 'paddlefsl.backbones' has no attribute 'GloVeRC'
(此 ISSUE 为 PaddlePaddle Hackathon 第二期活动的任务 ISSUE,更多详见 【PaddlePaddle Hackathon 第二期】任务总览)
【任务说明】任务标题:新增TPE超参数搜索api
【提交内容】
【合入标准】
在Omniglot和miniImageNet数据集的5-way 1-shot任务和5-way 5-shot任务进行测试。使MAML, ANIL, ProtoNet and RelationNet使用Bayesian optimization搜索出的超参数能达到比原汇报结果更高的效果。
【技术要求】
熟练掌握 Python,理解贝叶斯优化
【答疑交流】
如题。
Install problem 1.1.0
File "/home/fangsifan/Few_Shot/FSL-Mate/PaddleFSL/paddlefsl/backbones/gin.py", line 17, in
from pahelix.model_zoo.pretrain_gnns_model import PretrainGNNModel
ModuleNotFoundError: No module named 'pahelix'
(此 ISSUE 为 PaddlePaddle Hackathon 第二期活动的任务 ISSUE,更多详见 【PaddlePaddle Hackathon 第二期】任务总览)
【任务说明】
【提交内容】
【合入标准】
在Omniglot和miniImageNet数据集的5-way 1-shot任务和5-way 5-shot任务进行测试。使MAML, ANIL, ProtoNet and RelationNet使用random search 搜索出的超参数能达到比原汇报结果更高的效果。
【技术要求】
熟练掌握 Python
【答疑交流】
conda create -n paddleFSL python=3.7 -y
source activate paddleFSL
安装GPU版的PaddlePaddle:python -m pip install paddlepaddle-gpu==2.4.2 -i https://pypi.tuna.tsinghua.edu.cn/simple
检查paddle是否安装成功:python -c "import paddle;print(paddle.utils.run_check());print(paddle.version)" 【出现提示信息:PaddlePaddle is installed successfully!】
再次验证:python -c "import paddle;print(paddle.ones([3,3]))" 【如果GPU安装正确,输出就不会是0矩阵】
pip install rdkit-pypi
pip install pgl
pip install paddlehelix【若安装失败,Linux下设置环境变量 export SKLEARN_ALLOW_DEPRECATED_SKLEARN_PACKAGE_INSTALL=True(Windows下用set),再次安装】
pip install paddlefsl
pip install scikit-learn
python -m pip install ujson
验证paddlefsl是否安装成功:python -c "import paddlefsl;print(paddlefsl.version)" 【输出:1.1.0】
安装过程结束。
最好能够详细一些,非常感谢!
Run the sample code and report an error. The error information and code information are as follows.
ValueError: (InvalidArgument) Tensor holds the wrong type, it holds int, but desires to be int64_t.
[Hint: Expected valid == true, but received valid:0 != true:1.] (at C:\home\workspace\Paddle_release\paddle/fluid/framework/tensor_impl.h:33)
[operator < softmax_with_cross_entropy > error]
from paddlefsl.datasets import MiniImageNet
import paddle
import paddlefsl
from paddlefsl.model_zoo import maml
TRAIN_DATASET = paddlefsl.datasets.MiniImageNet(mode='train')
VALID_DATASET = paddlefsl.datasets.MiniImageNet(mode='valid')
TEST_DATASET = paddlefsl.datasets.MiniImageNet(mode='test')
MODEL = paddlefsl.backbones.Conv(input_size=(3, 84, 84), output_size=5)
def main():
train_dir = maml.meta_training(train_dataset=TRAIN_DATASET,
valid_dataset=VALID_DATASET,
ways=5,
shots=1,
model=MODEL,
meta_lr=0.002,
inner_lr=0.03,
iterations=10000,
meta_batch_size=32,
inner_adapt_steps=5,
report_iter=10)
if name == 'main':
main()
请教一下该如何修改root路径?也就是怎么使用当前文件夹下的raw_data文件夹?
同时example里面import的文件并不是当前路径下的,是~\anaconda3\envs\paddle_env\Lib\site-packages\paddlefsl-1.1.0-py3.8.egg\paddlefsl里面的文件,请问怎么修改使用当前文件夹下的py文件?
这个文件怎么没有了呢
In rc_position_embedding.py line 69:
head_position_vector = paddle.to_tensor(rc_vector[:, :, -1], dtype='int64')
But in rc_init_vector.py line 208, the head_position_idx
is -2 in rc_embedding
.
So I think it should be:
head_position_vector = paddle.to_tensor(rc_vector[:, :, -2], dtype='int64')
您好,我的问题是:
当我运行examples/image_classification
文件夹下的maml_image_classification.py
,终端提示说:
RuntimeError: Data files not found. Please download our mini-ImageNet file manually from
https://drive.google.com/file/d/1LLUjwSUpWGSWizl3JZxd08V30_dIaRBx/view
and place the .tar.gz file under 'root' which you can set, or under default root:/root/miniconda3/lib/python3.8/site-packages/paddlefsl-1.1.0-py3.8.egg/raw_data
所以我下载了该文件并放置在/root/FSL-Mate/PaddleFSL/raw_data
文件夹下,接下来该怎么运行呢?
(使用python maml_image_classification.py --root='/root/FSL-Mate/PaddleFSL/raw_data'
没有起作用;修改源文件autodl-tmp/FSL-Mate/PaddleFSL/paddlefsl/datasets/mini_imagenet.py
,将__init__
函数中的root=None
改为root='/root/FSL-Mate/PaddleFSL/raw_data'
也没有起作用:shipit:)
元学习不是说在识别A数据训练,学会识别B数据的能力吗?为什么代码中train、val、test数据用的是相同的数据?在实际测试中,我用猫狗数据集作为task-model的数据集,蜜蜂蚂蚁数据作为learn-model的数据集,效果并没有直接训练效果好。
Was this paper considered? Link
(If it was considered but not added, why is the reason? Just to prevent future me to make the same mistake asking for a similar thing)
Thank you!
After #23 merged, we can convert all of examples, under examples/image_classification
, to meta learner based examples.
I have an online meeting with @tata1661 before, and we believe that it will be more concise if the model-zoo examples be replaced with meta learner (optim-based) . Let's get it on the way.
SMASH is about NAS rather than FSL. "one-shot" in NAS means training only one model. It's nothing about the number of training data.
运行gnn的例子时,提示报错Exception has occurred: ModuleNotFoundError,No module named 'paddle.nn'
我的环境是 1080TI Ubuntu20.04
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2021 NVIDIA Corporation
Built on Fri_Dec_17_18:16:03_PST_2021
Cuda compilation tools, release 11.6, V11.6.55
Build cuda_11.6.r11.6/compiler.30794723_0
NVIDIA-SMI 510.39.01 Driver Version: 510.39.01 CUDA Version: 11.6
在conda中安装了paddlepaddle-gpu版本2.3.1
paddle-bfloat 0.1.7 pypi_0 pypi
paddlehelix 1.0.1 pypi_0 pypi
paddlepaddle-gpu 2.3.1.post116 pypi_0 pypi
pandas 1.3.5 pypi_0 pypi
pgl 2.2.3.post0 pypi_0 pypi
大家好,非常高兴地告诉大家,第二期 PaddlePaddle Hackathon 开始了。PaddlePaddle Hackathon 是面向全球开发者的深度学习领域编程活动,鼓励开发者了解与参与 PaddlePaddle 开源社区。本次共有四大专区:PaddlePaddle、Paddle Family、Paddle Friends、Paddle Eval,共计100+个任务供大家认领。详细信息可以参考 PaddlePaddle Hackathon 说明。大家是否已经迫不及待了呢~
本 ISSUE 是 Paddle Friends 专区 FSL-Mate 方向任务合集。具体任务列表如下:
序号 | 难度 | 任务 ISSUE |
---|---|---|
91 | ⭐️ | 新增random search超参数搜索api |
92 | ⭐️⭐️ | 新增TPE超参数搜索api |
93 | ⭐️⭐️⭐️ | 在PaddleFSL将模型库中的MAML和ANIL转为优化算法api |
若想要认领本次活动任务,请至 PaddlePaddle Hackathon 2 Pinned ISSUE 完成任务 ISSUE 认领。
(此 ISSUE 为 PaddlePaddle Hackathon 第二期活动的任务 ISSUE,更多详见 【PaddlePaddle Hackathon 第二期】任务总览)
【任务说明】
【提交内容】
【合入标准】
在Omniglot和miniImageNet数据集的5-way 1-shot任务和5-way 5-shot任务进行测试。使用算法api版的MAML, ANIL获得与原汇报结果一致或更高的效果。
【技术要求】
熟练掌握 Python
【答疑交流】
rt.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.