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

Replace deprecated arg in torchvision models #6401

Merged
merged 3 commits into from
Apr 20, 2023

Conversation

drbeh
Copy link
Member

@drbeh drbeh commented Apr 19, 2023

Description

For torchvision models, the parameter pretrained is deprecated since 0.13 and may be removed in the future. Our TorchVisionFC model has been using this parameter. This PR updated TorchVisionFC to remove calling pretrained and instead to call weights with appropriate defaults without any change in the functionality (backward compatible).

Types of changes

  • Non-breaking change (fix or new feature that would not break existing functionality).
  • Integration tests passed locally by running ./runtests.sh -f -u --net --coverage.
  • Quick tests passed locally by running ./runtests.sh --quick --unittests --disttests.

Signed-off-by: Behrooz <3968947+drbeh@users.noreply.github.com>
@drbeh drbeh requested review from wyli and Nic-Ma April 19, 2023 16:46
@drbeh drbeh changed the title Remove deprecated arg in torchvision models Replace deprecated arg in torchvision models Apr 19, 2023
Copy link
Contributor

@Nic-Ma Nic-Ma left a comment

Choose a reason for hiding this comment

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

Looks good to me.
Please ensure it's compatible with PyTorch 1.7 - 2.0.

Thanks.

@Nic-Ma
Copy link
Contributor

Nic-Ma commented Apr 19, 2023

/build

Signed-off-by: Wenqi Li <wenqil@nvidia.com>
@wyli
Copy link
Member

wyli commented Apr 20, 2023

/build

@wyli wyli enabled auto-merge (squash) April 20, 2023 06:57
@wyli wyli merged commit 05dbc86 into Project-MONAI:dev Apr 20, 2023
32 of 37 checks passed
@drbeh drbeh deleted the torchvision_pretrain branch April 20, 2023 13:35
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

Successfully merging this pull request may close these issues.

None yet

3 participants