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

Update Quantized Transfer Learning for Computer Vision tutorial to avoid use of copy.deepcopy() #2417

Conversation

mikgor
Copy link

@mikgor mikgor commented Jun 3, 2023

Fixes #2333

Description

Replace copy.deepcopy() with model.load_state_dict in Quantized Transfer Learning for Computer Vision tutorial.

@github-actions github-actions bot added docathon-h1-2023 A label for the docathon in H1 2023 easy and removed cla signed labels Jun 3, 2023
@netlify
Copy link

netlify bot commented Jun 3, 2023

Deploy Preview for pytorch-tutorials-preview ready!

Name Link
🔨 Latest commit ae26b75
🔍 Latest deploy log https://app.netlify.com/sites/pytorch-tutorials-preview/deploys/647e293a5ba2a400082ce69f
😎 Deploy Preview https://deploy-preview-2417--pytorch-tutorials-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@NicolasHug
Copy link
Member

Thank you for the PR @mikgor . I'm afraid the original code copy.deepcopy(model.state_dict()) is actually correct and doesn't need to be updated. I see #2333 was opened but I don't think it fits the original issue: here we're creating deepcopies of model.state_dict() which is a dict and that's a fine thing to do. The original problem stated in #2177 is about copying nn.Module but that's not the case here.

I don't think we should be merging this PR but let me see if we can still get you credits for it somehow

@svekars
Copy link
Contributor

svekars commented Jun 7, 2023

Thank you for looking into this @mikgor. We have recorded your contribution. Closing.

@svekars svekars closed this Jun 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update tutorial to avoid use of copy.deepcopy()- Quantized Transfer Learning for Computer Vision
4 participants