apple / apple/coremltools

8.0b2 linear_quantize_activations crash

Open
#2,321 9 comments 0 reactions 1 assignee Claimed by @junpeiz View on GitHub
awaiting response bug
Dominant language
Python
Stars
5.4k
Forks
850
Avg merge
4d 5h
Merged PRs (30d)
10

Description

## 🐞Describing the bug
I'm using 8.0b2 to quant my mlpkg, a resnet and transformer model. It crashed after printed 'calibration success'.

Debug:
in **_model_debugger.py--step function:** outputs = model.predict(inputs), outputs lost 5 layers which I could find in preview mlpackge in xcode.
![截屏2024-08-23 17 42 49](https://github.com/user-attachments/assets/5c37945a-68b5-42c0-ac55-9280f7a1eb5e)

When **_post_training_quatization.py--_adjust_concat_surrounding_activation_stats function** went to the line group_rmin_list.append(activation_stats_dict[tensor_name]["rmin"]), it crashed. Cuz the five lost layers were in concat_list_adjusted/concat_op_info_list, but not in activation_stats_dict.
![截屏2024-08-23 17 43 46](https://github.com/user-attachments/assets/9739509a-5aae-4770-9598-56d96f16996d)

Currently not sure is it a bug? What can I do for it?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.