未验证 提交 70f7c23f 编写于 作者: X xujiaqi01 提交者: GitHub

fix add dense table (#23681)

* fix add dense table
test=develop

* fix
test=develop

* fix
test=develop
上级 d98084e7
......@@ -470,10 +470,10 @@ class DistributedAdam(DistributedOptimizerImplBase):
strategy.get("scale_datanorm", -1)
})
program_configs[program_id]["pull_dense"].extend(
[dense_table_index])
program_configs[program_id]["push_dense"].extend(
[dense_table_index])
program_configs[program_id]["pull_dense"].extend(
[dense_table_index])
program_configs[program_id]["push_dense"].extend(
[dense_table_index])
dense_table_index += 1
# Todo(guru4elephant): figure out how to support more sparse parameters
......
......@@ -62,7 +62,9 @@ class TestFleet1(unittest.TestCase):
emb = fluid.layers.embedding(input=show, size=[1, 1], \
is_sparse=True, is_distributed=True, \
param_attr=fluid.ParamAttr(name="embedding"))
fc = fluid.layers.fc(input=emb, size=1, act=None)
bow = fluid.layers.sequence_pool(input=emb, pool_type='sum')
bow = fluid.layers.data_norm(input=bow, epsilon=1e-4, name="norm")
fc = fluid.layers.fc(input=bow, size=1, act=None)
label = fluid.layers.data(name="click", shape=[-1, 1], \
dtype="int64", lod_level=1, append_batch_size=False)
label_cast = fluid.layers.cast(label, dtype='float32')
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册