提交 21bd8f17 编写于 作者: X xjqbest

fix dnn dense var

上级 e270b2ad
...@@ -36,7 +36,7 @@ class Model(ModelBase): ...@@ -36,7 +36,7 @@ class Model(ModelBase):
def net(self, input, is_infer=False): def net(self, input, is_infer=False):
self.sparse_inputs = self._sparse_data_var[1:] 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] self.label_input = self._sparse_data_var[0]
def embedding_layer(input): def embedding_layer(input):
...@@ -52,8 +52,8 @@ class Model(ModelBase): ...@@ -52,8 +52,8 @@ class Model(ModelBase):
return emb_sum return emb_sum
sparse_embed_seq = list(map(embedding_layer, self.sparse_inputs)) sparse_embed_seq = list(map(embedding_layer, self.sparse_inputs))
concated = fluid.layers.concat(sparse_embed_seq, axis=1) concated = fluid.layers.concat(
#sparse_embed_seq + [self.dense_input], axis=1) sparse_embed_seq + [self.dense_input], axis=1)
fcs = [concated] fcs = [concated]
hidden_layers = envs.get_global_env("hyper_parameters.fc_sizes") hidden_layers = envs.get_global_env("hyper_parameters.fc_sizes")
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册