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

module BCELoss #5144

Merged
merged 33 commits into from
Jun 17, 2021
Merged

module BCELoss #5144

merged 33 commits into from
Jun 17, 2021

Conversation

wanghongsheng01
Copy link
Contributor

No description provided.

@wanghongsheng01 wanghongsheng01 requested review from oneflow-ci-bot and removed request for oneflow-ci-bot June 9, 2021 08:20
@wanghongsheng01
Copy link
Contributor Author

wanghongsheng01 commented Jun 11, 2021

image
image

self.negative = Negative()
self.log = Log()

def forward(self, input, target, weight):
Copy link
Contributor

Choose a reason for hiding this comment

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

weight应该在init里面定义吧

Copy link
Contributor Author

Choose a reason for hiding this comment

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

THX,已改

Copy link
Contributor

Choose a reason for hiding this comment

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

我已经把你的代码抄到我的工程里了,hhhh

out = -\sum_{i=1}^n(Target_i*log(Input_i) + (1-Target_i)*log(1-Input_i))

Args:
input (oneflow.experimental.Tensor): The input Tensor.
Copy link
Contributor

Choose a reason for hiding this comment

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

docs的Args里input,target好像和L90的输入参数不匹配

Copy link
Contributor Author

Choose a reason for hiding this comment

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

已对齐,THX

@@ -0,0 +1,27 @@
import torch
Copy link
Contributor

Choose a reason for hiding this comment

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

这个文件是本地测试torch的吧?可以删掉(不用pr上来)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

是的,已删

@oneflow-ci-bot oneflow-ci-bot self-requested a review June 17, 2021 08:39
@oneflow-ci-bot oneflow-ci-bot requested review from oneflow-ci-bot and removed request for oneflow-ci-bot June 17, 2021 09:32
@oneflow-ci-bot oneflow-ci-bot requested review from oneflow-ci-bot and removed request for oneflow-ci-bot June 17, 2021 11:38
@oneflow-ci-bot oneflow-ci-bot self-requested a review June 17, 2021 12:39
@oneflow-ci-bot oneflow-ci-bot requested review from oneflow-ci-bot and removed request for oneflow-ci-bot June 17, 2021 13:41
@oneflow-ci-bot oneflow-ci-bot requested review from oneflow-ci-bot and removed request for oneflow-ci-bot June 17, 2021 14:38
@oneflow-ci-bot oneflow-ci-bot self-requested a review June 17, 2021 15:24
@oneflow-ci-bot oneflow-ci-bot requested review from oneflow-ci-bot and removed request for oneflow-ci-bot June 17, 2021 16:05
@oneflow-ci-bot oneflow-ci-bot removed their request for review June 17, 2021 17:08
@oneflow-ci-bot oneflow-ci-bot requested review from oneflow-ci-bot and removed request for oneflow-ci-bot June 17, 2021 17:08
@oneflow-ci-bot oneflow-ci-bot merged commit b6b8f3a into master Jun 17, 2021
@oneflow-ci-bot oneflow-ci-bot deleted the bce_loss branch June 17, 2021 17:52
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.

4 participants