提交 eb6af305 编写于 作者: Q Qiao Longfei

change embedding interface addnremote_prefetch

上级 0a828fef
...@@ -306,7 +306,8 @@ def embedding(input, ...@@ -306,7 +306,8 @@ def embedding(input,
is_distributed=False, is_distributed=False,
padding_idx=None, padding_idx=None,
param_attr=None, param_attr=None,
dtype='float32'): dtype='float32',
remote_prefetch=False):
""" """
**Embedding Layer** **Embedding Layer**
...@@ -345,7 +346,7 @@ def embedding(input, ...@@ -345,7 +346,7 @@ def embedding(input,
""" """
helper = LayerHelper('embedding', **locals()) helper = LayerHelper('embedding', **locals())
remote_prefetch = is_sparse and (not is_distributed) remote_prefetch = is_sparse and (not is_distributed) and remote_prefetch
if remote_prefetch: if remote_prefetch:
assert is_sparse is True and is_distributed is False assert is_sparse is True and is_distributed is False
w = helper.create_parameter( w = helper.create_parameter(
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册