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

Hardcoded threshold in save_preds #98

Open
LoaferCH opened this issue Jan 20, 2023 · 0 comments
Open

Hardcoded threshold in save_preds #98

LoaferCH opened this issue Jan 20, 2023 · 0 comments

Comments

@LoaferCH
Copy link
Collaborator

There is a hardcoded threshold value of 0.3 in save method.

pred[pred < 0.3] = 0
pred[pred > 0] = 255

Also it may be unnecessary since thresholding is already done in forward method, so the output already is in unit8 type.

outs = (logits > self.threshold).to(torch.uint8)

So, only this line may be left:

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

1 participant