提交 28d997cc 编写于 作者: T tangwei

Merge branch 'master' of https://github.com/PaddlePaddle/PaddleRec into multi_phase

...@@ -116,7 +116,7 @@ python -m paddlerec.run -m paddlerec.models.rank.dnn ...@@ -116,7 +116,7 @@ python -m paddlerec.run -m paddlerec.models.rank.dnn
* [分布式深度学习介绍](doc/ps_background.md) * [分布式深度学习介绍](doc/ps_background.md)
### 快速开始 ### 快速开始
* [十分钟上手PaddleRec](doc/quick_start.md) * [十分钟上手PaddleRec](https://aistudio.baidu.com/aistudio/projectdetail/523965)
### 入门教程 ### 入门教程
* [数据准备](doc/slot_reader.md) * [数据准备](doc/slot_reader.md)
......
...@@ -69,14 +69,11 @@ class Model(ModelBase): ...@@ -69,14 +69,11 @@ class Model(ModelBase):
map(embedding_layer, self.user_sparse_inputs)) map(embedding_layer, self.user_sparse_inputs))
mov_sparse_embed_seq = list( mov_sparse_embed_seq = list(
map(embedding_layer, self.mov_sparse_inputs)) map(embedding_layer, self.mov_sparse_inputs))
concated_user = fluid.layers.concat(user_sparse_embed_seq, axis=1) concated = fluid.layers.concat(
concated_mov = fluid.layers.concat(mov_sparse_embed_seq, axis=1) user_sparse_embed_seq + mov_sparse_embed_seq, axis=1)
usr_combined_features = fc(concated_user) fc_input = fc(concated)
mov_combined_features = fc(concated_mov)
fc_input = fluid.layers.concat(
[usr_combined_features, mov_combined_features], axis=1)
sim = fluid.layers.fc( sim = fluid.layers.fc(
input=fc_input, input=fc_input,
size=1, size=1,
...@@ -92,8 +89,6 @@ class Model(ModelBase): ...@@ -92,8 +89,6 @@ class Model(ModelBase):
# slide_steps=20) # slide_steps=20)
if is_infer: if is_infer:
self._infer_results["user_feature"] = usr_combined_features
self._infer_results["movie_feature"] = mov_combined_features
self._infer_results["uid"] = self._sparse_data_var[2] self._infer_results["uid"] = self._sparse_data_var[2]
self._infer_results["movieid"] = self._sparse_data_var[6] self._infer_results["movieid"] = self._sparse_data_var[6]
self._infer_results["label"] = self._sparse_data_var[-1] self._infer_results["label"] = self._sparse_data_var[-1]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册