-
Notifications
You must be signed in to change notification settings - Fork 645
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
model MIND #398
model MIND #398
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
有一些格式上的小问题需要注意一下
models/recall/mind/README.md
Outdated
在mind模型目录的快速执行命令如下: | ||
``` | ||
# 进入模型目录 | ||
# cd models/recall/word2vec # 在任意目录均可运行 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
目录名称改一下
models/recall/mind/README.md
Outdated
# 动态图训练 | ||
python -u ../../../tools/trainer.py -m config.yaml | ||
# 动态图预测 | ||
python -u evaluate_dygraph.py -m config.yaml -top_n 50 #对测试数据进行预测,并通过faiss召回候选结果评测Reacll、NDCG、HitRate指标 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
如果需要重写tools下的infer.py和static_infer.py,需要保持命名上的统一,名称还叫infer.py。可以参考word2vec
models/recall/mind/README.md
Outdated
``` | ||
3. 切回模型目录,执行命令运行全量数据 | ||
```bash | ||
d - # 切回模型目录 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里应该是cd命令
models/recall/mind/README.md
Outdated
│ ├── demo #demo训练数据 | ||
│ │ └── demo.txt | ||
│ ├── processs.py #处理全量数据的脚本 | ||
│ ├── run.sh #全量数据下载的脚本 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
可以将处理完成的全量数据加入BOS中,run.sh放在paddlerec/dataset目录下,方便用户直接使用以及切换数据集
models/recall/mind/net.py
Outdated
mean=0.0, std=self.init_std)) | ||
# paddle.static.Print(self.routing_logits) | ||
|
||
# 仿射变换的参数 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
注释为汉字可能会有问题
@@ -0,0 +1,217 @@ | |||
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
版权信息开头不用缩进这么多
@@ -0,0 +1,198 @@ | |||
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
版权信息开头不用缩进这么多
@@ -0,0 +1,72 @@ | |||
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
版权信息开头不用缩进这么多
models/recall/mind/config.yaml
Outdated
neg_samples: 1280 | ||
maxlen: 20 | ||
pow_p: 1.0 | ||
distributed_embedding: 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里为什么是0?
models/recall/mind/README.md
Outdated
# MIND(Multi-Interest Network with Dynamic Routing) | ||
|
||
以下是本例的简要目录结构及说明: | ||
```shell |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
readme中,可以直接拿出来执行的用bash,不能执行的直接用```即可
实现MIND(Multi-Interest Network with Dynamic Routing forRecommendation at Tmall)
http://cn.arxiv.org/pdf/1904.08030v1