diff --git a/models/rank/dnn/model.py b/models/rank/dnn/model.py index 709a4f1f0c45033827495a733b68c823f33b8c18..78c8802042692108438e33e528a935f886ed207b 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")