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

Fix tutorial to avoid use of copy.deepcopy()- FX Graph Mode #2385

Merged
merged 2 commits into from
Jun 1, 2023

Conversation

QasimKhan5x
Copy link
Contributor

@QasimKhan5x QasimKhan5x commented Jun 1, 2023

Fixes #2330

Description

Removed the use of deepcopy.copy to copy the float_model. Instead, used load_model to create another instance of the model, i.e., model_to_quantize = load_model(saved_model_dir + float_model_file).to("cpu") instead of model_to_quantize = copy.deepcopy(float_model)

Used load_model to create the copy because float_model is also being created using load_model

cc @eellison @suo @gmagogsfm @jamesr66a @msaroufim @SherlockNoMad

@netlify
Copy link

netlify bot commented Jun 1, 2023

Deploy Preview for pytorch-tutorials-preview ready!

Name Link
🔨 Latest commit bf46091
🔍 Latest deploy log https://app.netlify.com/sites/pytorch-tutorials-preview/deploys/6479222fec294900084d3810
😎 Deploy Preview https://deploy-preview-2385--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.

@github-actions github-actions bot added docathon-h1-2023 A label for the docathon in H1 2023 easy and removed cla signed labels Jun 1, 2023
@svekars svekars added the fx issues related to fx label Jun 1, 2023
@github-actions github-actions bot removed cla signed fx issues related to fx labels Jun 1, 2023
@svekars svekars requested a review from msaroufim June 1, 2023 22:23
@svekars svekars merged commit d41e23b into pytorch:main Jun 1, 2023
7 checks passed
@QasimKhan5x QasimKhan5x deleted the patch-3 branch June 2, 2023 06:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docathon-h1-2023 A label for the docathon in H1 2023 easy
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update tutorial to avoid use of copy.deepcopy()- FX Graph Mode
4 participants