Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

do not fuse model again for a QAT model #643

Closed

Conversation

stephenyan1231
Copy link
Contributor

Summary:
For a QAT model, it contains observers. After QAT training, those observers already contain updated statistics, such as min_val, max_val.

When we want to export FP32 QAT model for a sanity check, if we call fuse_utils.fuse_model() again (which is often already called when we build the QAT model before QAT training), it will remove statistics in the observers.

Differential Revision: D52152688

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Dec 14, 2023
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D52152688

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D52152688

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D52152688

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D52152688

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D52152688

Summary:

For a QAT model, it contains observers. After QAT training, those observers already contain updated statistics, such as min_val, max_val.

When we want to export FP32 QAT model for a sanity check, if we call **fuse_utils.fuse_model()** again (which is often already called when we build the QAT model before QAT training), it will remove statistics in the observers.

Differential Revision: D52152688
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D52152688

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 8f13023.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants