Skip to content

Commit

Permalink
add nn.Embedding
Browse files Browse the repository at this point in the history
  • Loading branch information
seiriosPlus committed Aug 27, 2020
1 parent 51611c4 commit 1bc093a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions python/paddle/nn/functional/input.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ def embedding(x, weight, padding_idx=None, sparse=False, name=None):
initializer=fluid.initializer.NumpyArrayInitializer(weight_data),
trainable=True)
emb = paddle.nn.functional.embedding(x=data, weight=weight, sparse=True, name="sparse_embedding")
"""
if in_dygraph_mode():
return core.ops.lookup_table_v2(
Expand Down

0 comments on commit 1bc093a

Please sign in to comment.