You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The notebook "manually" imports functions from torchvision (without version reference), which seem to have been updated since, thereby leading to an error when running the example.
Specifically, in the "Create data loader" section:
I get the following error using the function load_data: 'mock_args' object has no attribute 'val_resize_size'
It seems that the namedtuple _args is expected to have more attributes. I checked out the load_data function and it expects many more attributes besides 'val_resize_size'.
Unless I imported the wrong function or forgot to run another code-block, I'd guess that the example needs to be updated to be compatible with the current torchvision functions. At the very least, the example could point to the version that was used.
This example is referenced in an Nvidia blog. Keeping this up-to-date might help others stumbling upon this.
It seems that things are moving quite fast in this area and the current modus operandi is to create new tools instead of building on existing ones. Don't expect too much support here. For anyone looking into quantization stuff, the TensorRT Model Optimizer seems to be quite fresh. The section on PyTorch is refactored based on pytorch_quantization. You may find more going on there. Good luck!
Description
I'm trying to run the following pytorch-quantization example:
tools/pytorch-quantization/examples/calibrate_quant_resnet50.ipynb
The notebook "manually" imports functions from torchvision (without version reference), which seem to have been updated since, thereby leading to an error when running the example.
Specifically, in the "Create data loader" section:
I get the following error using the function load_data:
'mock_args' object has no attribute 'val_resize_size'
It seems that the namedtuple _args is expected to have more attributes. I checked out the load_data function and it expects many more attributes besides 'val_resize_size'.
Unless I imported the wrong function or forgot to run another code-block, I'd guess that the example needs to be updated to be compatible with the current torchvision functions. At the very least, the example could point to the version that was used.
This example is referenced in an Nvidia blog. Keeping this up-to-date might help others stumbling upon this.
Environment
TensorRT Version: 8.6.1
Operating System: Windows
Python Version: 3.9.12
PyTorch Version: 2.1.1+cu121
Steps To Reproduce
Run tools/pytorch-quantization/examples/calibrate_quant_resnet50.ipynb
The text was updated successfully, but these errors were encountered: