提交 cb4b27de 编写于 作者: Z zhangwenhui03

fix bug

上级 01b2cf86
......@@ -101,11 +101,8 @@ def skip_gram_word2vec(dict_size, embedding_size, is_sparse=False, neg_num=5):
label_ones)
neg_xent = fluid.layers.sigmoid_cross_entropy_with_logits(neg_logits,
label_zeros)
cost = fluid.layers.elementwise_add(
fluid.layers.reduce_sum(
true_xent, dim=1),
fluid.layers.reduce_sum(
true_xent, fluid.layers.reduce_sum(
neg_xent, dim=1))
avg_cost = fluid.layers.reduce_mean(cost)
return avg_cost, py_reader
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册