The code in book/04.word2vec/train.py is inconsistent with the doc.
Created by: qingqing01
The code in the doc is:
def wordemb(inlayer):
wordemb = paddle.layer.table_projection(
input=inlayer,
size=embsize,
param_attr=paddle.attr.Param(
name="_proj",
initial_std=0.001,
learning_rate=1,
l2_rate=0,
sparse_update=True))
return wordemb
But the code in train.py
is: