-
Notifications
You must be signed in to change notification settings - Fork 651
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 ModelDebugger.step
to use only intermediate_outputs
#2405
base: main
Are you sure you want to change the base?
Conversation
Thanks for the PR @Zerui18 , |
Some references for activation quantization unit tests (you could also put your unit test there):
References for getting a mlmodel with ImageType as output:
|
@jakesabathia2 I've added a corresponding unit test and rebased both changes to be a single commit on top of the current head. Please help to review it, thank you. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Zerui18 the CI is failing.
Can you rebase on the latest |
e5da1a9
to
71b7246
Compare
`record_intermediate_output` only expects intermediate outputs, not model outputs which could be of type `PIL.Image`. Also added corresponding test on `_get_activation_calibration_stats` which is currently the only user entrypoint to `ModelDebugger.step`.
Hi @jakesabathia2, I have rebase my commit on the current head as requested! Please have a look again. Thanks! |
Issue
Calling
cto.coreml.experimental.linear_quantize_activations
on a model withct.ImageType
output(s) fails at the model output becauserecord_intermediate_output
expectsoutput_value
to be anp.ndarray
but the model's final output isPIL.Image
.Ultimately,
record_intermediate_output
only expects intermediate outputs, not model outputs which could be of typePIL.Image
.Followup From
#2385