Skip to content

Added missing arg description in lraspp_mobilenet_v3_large #4228

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

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions torchvision/models/segmentation/segmentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ def lraspp_mobilenet_v3_large(pretrained=False, progress=True, num_classes=21, *
contains the same classes as Pascal VOC
progress (bool): If True, displays a progress bar of the download to stderr
num_classes (int): number of output classes of the model (including the background)
aux_loss (bool): If True, it uses an auxiliary loss
Copy link
Member

Choose a reason for hiding this comment

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

thanks for the PR @frgfm

If you look just below we have

    if kwargs.pop("aux_loss", False):
        raise NotImplementedError('This model does not use auxiliary loss')

So documenting aux_loss is actually more confusing than anything. We should instead indicate how the kwargs argument is used

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh my bad, I misread, I thought the arg was declared outside of kwargs!

Copy link
Member

Choose a reason for hiding this comment

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

We'll be happy to consider a Pr for kwargs though, if you feel like it :) !

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Mmmh, what do you have in mind?

Something like saying whose kwargs are those and mentioning the special case of aux_loss?

"""
if kwargs.pop("aux_loss", False):
raise NotImplementedError('This model does not use auxiliary loss')
Expand Down