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

model MIND #398

Merged
merged 4 commits into from
Mar 23, 2021
Merged

model MIND #398

merged 4 commits into from
Mar 23, 2021

Conversation

duyiqi17
Copy link
Contributor

实现MIND(Multi-Interest Network with Dynamic Routing forRecommendation at Tmall)

http://cn.arxiv.org/pdf/1904.08030v1

@CLAassistant
Copy link

CLAassistant commented Mar 19, 2021

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@yinhaofeng yinhaofeng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

有一些格式上的小问题需要注意一下

在mind模型目录的快速执行命令如下:
```
# 进入模型目录
# cd models/recall/word2vec # 在任意目录均可运行
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

目录名称改一下

# 动态图训练
python -u ../../../tools/trainer.py -m config.yaml
# 动态图预测
python -u evaluate_dygraph.py -m config.yaml -top_n 50 #对测试数据进行预测,并通过faiss召回候选结果评测Reacll、NDCG、HitRate指标
Copy link
Contributor

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

```
3. 切回模型目录,执行命令运行全量数据
```bash
d - # 切回模型目录
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里应该是cd命令

│ ├── demo #demo训练数据
│ │ └── demo.txt
│ ├── processs.py #处理全量数据的脚本
│ ├── run.sh #全量数据下载的脚本
Copy link
Contributor

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目录下,方便用户直接使用以及切换数据集

mean=0.0, std=self.init_std))
# paddle.static.Print(self.routing_logits)

# 仿射变换的参数
Copy link
Contributor

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.
Copy link
Contributor

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.
Copy link
Contributor

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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

版权信息开头不用缩进这么多

neg_samples: 1280
maxlen: 20
pow_p: 1.0
distributed_embedding: 0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里为什么是0?

yinhaofeng
yinhaofeng previously approved these changes Mar 19, 2021
# MIND(Multi-Interest Network with Dynamic Routing)

以下是本例的简要目录结构及说明:
```shell
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

readme中,可以直接拿出来执行的用bash,不能执行的直接用```即可

@seemingwang seemingwang merged commit 26ef070 into PaddlePaddle:master Mar 23, 2021
wangzhen38 pushed a commit to wangzhen38/PaddleRec that referenced this pull request Aug 6, 2021
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

Successfully merging this pull request may close these issues.

4 participants