sony / model_optimization

Model Compression Toolkit (MCT) is an open source project for neural network model optimization under efficient, constrained hardware. This project provides researchers, developers, and engineers advanced quantization and compression tools for deploying state-of-the-art neural networks.
https://sony.github.io/model_optimization/
Apache License 2.0
297 stars 49 forks source link

'DataLoader' object not callable #1196

Closed freke closed 1 week ago

freke commented 2 weeks ago

Issue Type

Bug

Source

pip (model-compression-toolkit)

MCT Version

Running on Google Colab

OS Platform and Distribution

Running on Google Colab

Python version

3.10

Describe the issue

Error trying to run the example in colab, get the error "'DataLoader' object not callable" Screenshot from 2024-08-29 08-51-53

Expected behaviour

To be able to run the example code with out issues.

Code to reproduce the issue

https://github.com/sony/model_optimization/blob/main/tutorials/notebooks/imx500_notebooks/pytorch/pytorch_yolov8n_pose_for_imx500.ipynb

Log output

Screenshot from 2024-08-29 08-51-53

alexander-sony commented 2 weeks ago

for me it seems that the representative_dataset_gen is not created properly, missing the extra step of generator creation from DataLoader, compare with code block setup for post training quantization.