Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bugfix]: fix bug of softmax_loss_with_negative_mining loss #237

Merged
merged 2 commits into from
Jul 18, 2022

Conversation

yangxudong
Copy link
Collaborator

No description provided.

@github-actions
Copy link

CI Test Passed

@github-actions github-actions bot added the ci_test_passed ci test passed label Jul 15, 2022
@@ -65,33 +63,36 @@ def softmax_loss_with_negative_mining(user_emb,
Return:
support vector guided softmax loss of positive labels
"""
batch_size = get_shape_list(item_emb)[0]
assert 0 < num_negative_samples < batch_size, '`num_negative_samples` should be in range [1, batch_size)'
assert 0 < num_negative_samples, '`num_negative_samples` should be in range [1, batch_size)'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这句代码 0 < num_negative_samples 和 后面的 num_negative_samples` should be in range [1, batch_size)' 不对应。

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已修改

@github-actions
Copy link

CI Test Passed

@github-actions github-actions bot removed the ci_test_passed ci test passed label Jul 15, 2022
@github-actions
Copy link

CI PY3 Test Passed

@yangxudong yangxudong merged commit e6622a2 into master Jul 18, 2022
@yangxudong yangxudong deleted the bugfix/softmax_loss branch July 18, 2022 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants