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

Revisit "include_background" variable name in loss functions #7056

Open
ericspod opened this issue Sep 27, 2023 · 1 comment
Open

Revisit "include_background" variable name in loss functions #7056

ericspod opened this issue Sep 27, 2023 · 1 comment
Labels
Design discussions related to the generic API designs

Comments

@ericspod
Copy link
Member

ericspod commented Sep 27, 2023

I believe that using "include_channel_zero" as an alternative to "include_background" may not be the best choice due to the loss of argument semantics. In contrast, the name "include_background" directly conveys the purpose of this argument to the user. The core issue of original post is that the channel of background is confusing. One potential solution could be to introduce an optional argument, such as background_channel: int | Sequence[int] = 0, to clarify this aspect. BTW, argument such as include_channel: int | Sequence[int] = 0 could be better than "include_channel_zero" .

Originally posted by @ChenglongWang in #6915 (comment)

See whole discussion for further feedback.

@ericspod ericspod added the Design discussions related to the generic API designs label Sep 27, 2023
@myron
Copy link
Collaborator

myron commented Sep 29, 2023

I actually like "include_background", and I'd vote to keep it as is, simply because we've been using it for a long time now. And in the class doc it's explained what it means, if anyone is confused, it's really easy to read the doc (or comment in the class .py) . I've never encountered situations when the background (if present) is at a different non-zero channel. Unless there is a real use-case, I don't think we should over-complicate the api.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Design discussions related to the generic API designs
Projects
None yet
Development

No branches or pull requests

2 participants