From 21bd8f17319ce682d3fc1b1b312dab82d5b3ac24 Mon Sep 17 00:00:00 2001 From: xjqbest <173596896@qq.com> Date: Tue, 9 Jun 2020 16:47:34 +0800 Subject: [PATCH] fix dnn dense var --- models/rank/dnn/model.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/models/rank/dnn/model.py b/models/rank/dnn/model.py index 709a4f1f..78c88020 100755 --- a/models/rank/dnn/model.py +++ b/models/rank/dnn/model.py @@ -36,7 +36,7 @@ class Model(ModelBase): def net(self, input, is_infer=False): self.sparse_inputs = self._sparse_data_var[1:] - self.dense_input = [] #self._dense_data_var[0] + self.dense_input = self._dense_data_var[0] self.label_input = self._sparse_data_var[0] def embedding_layer(input): @@ -52,8 +52,8 @@ class Model(ModelBase): return emb_sum sparse_embed_seq = list(map(embedding_layer, self.sparse_inputs)) - concated = fluid.layers.concat(sparse_embed_seq, axis=1) - #sparse_embed_seq + [self.dense_input], axis=1) + concated = fluid.layers.concat( + sparse_embed_seq + [self.dense_input], axis=1) fcs = [concated] hidden_layers = envs.get_global_env("hyper_parameters.fc_sizes") -- GitLab