expose example_input argument in setup_qat_model()
Summary: Pull Request resolved: https://github.com/facebookresearch/d2go/pull/647 Major changes - **example_input** argument in **prepare_fake_quant_model()** is useful in certain cases. For example, in Argos model **custom_prepare_fx()** method under FX graph + QAT setup (D52760682), it is used to prepare example inputs to individual sub-modules by running one forward pass and bookkeeping the inputs to individual sub-modules. Therefore, we export argument **example_input** in **setup_qat_model()** function. - For QAT model, currently we assert # of state dict keys (excluding observers) should be equal to # of state dict keys in the original model. However, when the assertion fails, it does not log useful information for debugging. We make changes to report what are the unique keys in each state dict. Reviewed By: navsud Differential Revision: D52760688 fbshipit-source-id: 27535a0324ebe6513f198acb839918a0346720d0
Showing
Please register or sign in to comment