Evaluate a pretrained Model Using Imagenet

Is there any example code that evaluates the entire ImageNet dataset using a pre-trained model like those from Torchvision’s official website (using quantized Resnet50, for example)?

I would assume the validate function was used to create the torchvision results.

Yes, I tried, and it works only on fp32 pre-trained models, not with int8 quantized ones. When the program computes “output = model(images)”, it reports a segmentation fault and fails.

This only happens with quantized models, so I guess there is no issue with my cuda/pytorch/torchvision configuration: Cuda 11.2, torch 1.12.1+cu113, torchaudio 0.12.1+cu113, torchsummary 1.5.1, torchvision 0.13.1+cu113. My Cuda is older than the Cuda built with pytorch (11.3), but it is recognized well.

I wonder, if is there any issue with quantized models.