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

confusion in OhemCrossEntropy loss function #15

Open
Srutsth opened this issue Apr 3, 2021 · 1 comment
Open

confusion in OhemCrossEntropy loss function #15

Srutsth opened this issue Apr 3, 2021 · 1 comment

Comments

@Srutsth
Copy link

Srutsth commented Apr 3, 2021

pred = prob[label, np.arange(len(label), dtype=np.int32)]

What does this line do in OhemCrossEntropy do?

@Serge-weihao
Copy link
Owner

Serge-weihao commented Apr 6, 2021

pred = prob[label, np.arange(len(label), dtype=np.int32)]

I guess that means to get the gt class related predicted score for each (valid) pixel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants