Skip to content

Commit

Permalink
nce_layer cannot accept neg_distribution
Browse files Browse the repository at this point in the history
  • Loading branch information
reyoung committed Apr 12, 2017
1 parent caffcc8 commit e8f65b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/paddle/trainer_config_helpers/layers.py
Original file line number Diff line number Diff line change
Expand Up @@ -4873,7 +4873,7 @@ def nce_layer(input,
if neg_distribution is not None:
assert isinstance(neg_distribution, collections.Sequence)
assert len(neg_distribution) == num_classes
assert sum(neg_distribution) == 1
assert abs(sum(neg_distribution) - 1.0) < 1e-5
if not isinstance(act, BaseActivation):
raise TypeError()

Expand Down

0 comments on commit e8f65b8

Please sign in to comment.