diff --git a/README.md b/README.md index a34e9eda350bd5b185e77c97cc36b48a5fa677b7..b326d4c54a3d5ee681b359771cc9129b8f863f20 100644 --- a/README.md +++ b/README.md @@ -116,7 +116,7 @@ python -m paddlerec.run -m paddlerec.models.rank.dnn * [分布式深度学习介绍](doc/ps_background.md) ### 快速开始 -* [十分钟上手PaddleRec](doc/quick_start.md) +* [十分钟上手PaddleRec](https://aistudio.baidu.com/aistudio/projectdetail/523965) ### 入门教程 * [数据准备](doc/slot_reader.md) diff --git a/models/demo/movie_recommand/rank/model.py b/models/demo/movie_recommand/rank/model.py index 6e6e42742748611441130a1cddc268bc91e16444..45a6faa0b8f16ab1ce293276b9069dfb7afc4a4e 100644 --- a/models/demo/movie_recommand/rank/model.py +++ b/models/demo/movie_recommand/rank/model.py @@ -69,14 +69,11 @@ class Model(ModelBase): map(embedding_layer, self.user_sparse_inputs)) mov_sparse_embed_seq = list( map(embedding_layer, self.mov_sparse_inputs)) - concated_user = fluid.layers.concat(user_sparse_embed_seq, axis=1) - concated_mov = fluid.layers.concat(mov_sparse_embed_seq, axis=1) + concated = fluid.layers.concat( + user_sparse_embed_seq + mov_sparse_embed_seq, axis=1) - usr_combined_features = fc(concated_user) - mov_combined_features = fc(concated_mov) + fc_input = fc(concated) - fc_input = fluid.layers.concat( - [usr_combined_features, mov_combined_features], axis=1) sim = fluid.layers.fc( input=fc_input, size=1, @@ -92,8 +89,6 @@ class Model(ModelBase): # slide_steps=20) 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["movieid"] = self._sparse_data_var[6] self._infer_results["label"] = self._sparse_data_var[-1]