Following your advice 1 and a recent commit by the pytorch-pruning original author 1, I managed to get past cpu/gpu backend error. Now, I am facing some squeezenet tensor size mismatch issues:

[phung@archlinux SqueezeNet-Pruning]$ python predict.py --image 3_100.jpg --model model_prunned --num_class 2
/usr/lib/python3.7/site-packages/torchvision/models/squeezenet.py:94: UserWarning: nn.init.kaiming_uniform is now deprecated in favor of nn.init.kaiming_uniform_.
init.kaiming_uniform(m.weight.data)
/usr/lib/python3.7/site-packages/torchvision/models/squeezenet.py:92: UserWarning: nn.init.normal is now deprecated in favor of nn.init.normal_.
init.normal(m.weight.data, mean=0.0, std=0.01)
Traceback (most recent call last):
File “predict.py”, line 29, in 
model.load_state_dict(checkpoint)
File “/usr/lib/python3.7/site-packages/torch/nn/modules/module.py”, line 723, in load_state_dict
self.class.name, “\n\t”.join(error_msgs)))
RuntimeError: Error(s) in loading state_dict for ModifiedSqueezeNetModel:
size mismatch for features.0.weight: copying a param of torch.Size([31, 3, 3, 3]) from checkpoint, where the shape is torch.Size([64, 3, 3, 3]) in current model.
size mismatch for features.0.bias: copying a param of torch.Size([31]) from checkpoint, where the shape is torch.Size([64]) in current model.
size mismatch for features.3.squeeze.weight: copying a param of torch.Size([16, 31, 1, 1]) from checkpoint, where the shape is torch.Size([16, 64, 1, 1]) in current model.
size mismatch for features.3.expand1x1.weight: copying a param of torch.Size([46, 16, 1, 1]) from checkpoint, where the shape is torch.Size([64, 16, 1, 1]) in current model.
size mismatch for features.3.expand1x1.bias: copying a param of torch.Size([46]) from checkpoint, where the shape is torch.Size([64]) in current model.
size mismatch for features.3.expand3x3.weight: copying a param of torch.Size([45, 16, 3, 3]) from checkpoint, where the shape is torch.Size([64, 16, 3, 3]) in current model.
size mismatch for features.3.expand3x3.bias: copying a param of torch.Size([45]) from checkpoint, where the shape is torch.Size([64]) in current model.
size mismatch for features.4.squeeze.weight: copying a param of torch.Size([16, 91, 1, 1]) from checkpoint, where the shape is torch.Size([16, 128, 1, 1]) in current model.
size mismatch for features.4.expand1x1.weight: copying a param of torch.Size([33, 16, 1, 1]) from checkpoint, where the shape is torch.Size([64, 16, 1, 1]) in current model.
size mismatch for features.4.expand1x1.bias: copying a param of torch.Size([33]) from checkpoint, where the shape is torch.Size([64]) in current model.
size mismatch for features.4.expand3x3.weight: copying a param of torch.Size([28, 16, 3, 3]) from checkpoint, where the shape is torch.Size([64, 16, 3, 3]) in current model.
size mismatch for features.4.expand3x3.bias: copying a param of torch.Size([28]) from checkpoint, where the shape is torch.Size([64]) in current model.
size mismatch for features.6.squeeze.weight: copying a param of torch.Size([32, 61, 1, 1]) from checkpoint, where the shape is torch.Size([32, 128, 1, 1]) in current model.
size mismatch for features.6.expand1x1.weight: copying a param of torch.Size([83, 32, 1, 1]) from checkpoint, where the shape is torch.Size([128, 32, 1, 1]) in current model.
size mismatch for features.6.expand1x1.bias: copying a param of torch.Size([83]) from checkpoint, where the shape is torch.Size([128]) in current model.
size mismatch for features.6.expand3x3.weight: copying a param of torch.Size([60, 32, 3, 3]) from checkpoint, where the shape is torch.Size([128, 32, 3, 3]) in current model.
size mismatch for features.6.expand3x3.bias: copying a param of torch.Size([60]) from checkpoint, where the shape is torch.Size([128]) in current model.
size mismatch for features.7.squeeze.weight: copying a param of torch.Size([32, 143, 1, 1]) from checkpoint, where the shape is torch.Size([32, 256, 1, 1]) in current model.
size mismatch for features.7.expand1x1.weight: copying a param of torch.Size([69, 32, 1, 1]) from checkpoint, where the shape is torch.Size([128, 32, 1, 1]) in current model.
size mismatch for features.7.expand1x1.bias: copying a param of torch.Size([69]) from checkpoint, where the shape is torch.Size([128]) in current model.
size mismatch for features.7.expand3x3.weight: copying a param of torch.Size([46, 32, 3, 3]) from checkpoint, where the shape is torch.Size([128, 32, 3, 3]) in current model.
size mismatch for features.7.expand3x3.bias: copying a param of torch.Size([46]) from checkpoint, where the shape is torch.Size([128]) in current model.
size mismatch for features.9.squeeze.weight: copying a param of torch.Size([48, 115, 1, 1]) from checkpoint, where the shape is torch.Size([48, 256, 1, 1]) in current model.
size mismatch for features.9.expand1x1.weight: copying a param of torch.Size([84, 48, 1, 1]) from checkpoint, where the shape is torch.Size([192, 48, 1, 1]) in current model.
size mismatch for features.9.expand1x1.bias: copying a param of torch.Size([84]) from checkpoint, where the shape is torch.Size([192]) in current model.
size mismatch for features.9.expand3x3.weight: copying a param of torch.Size([80, 48, 3, 3]) from checkpoint, where the shape is torch.Size([192, 48, 3, 3]) in current model.
size mismatch for features.9.expand3x3.bias: copying a param of torch.Size([80]) from checkpoint, where the shape is torch.Size([192]) in current model.
size mismatch for features.10.squeeze.weight: copying a param of torch.Size([48, 164, 1, 1]) from checkpoint, where the shape is torch.Size([48, 384, 1, 1]) in current model.
size mismatch for features.10.expand1x1.weight: copying a param of torch.Size([75, 48, 1, 1]) from checkpoint, where the shape is torch.Size([192, 48, 1, 1]) in current model.
size mismatch for features.10.expand1x1.bias: copying a param of torch.Size([75]) from checkpoint, where the shape is torch.Size([192]) in current model.
size mismatch for features.10.expand3x3.weight: copying a param of torch.Size([81, 48, 3, 3]) from checkpoint, where the shape is torch.Size([192, 48, 3, 3]) in current model.
size mismatch for features.10.expand3x3.bias: copying a param of torch.Size([81]) from checkpoint, where the shape is torch.Size([192]) in current model.
size mismatch for features.11.squeeze.weight: copying a param of torch.Size([64, 156, 1, 1]) from checkpoint, where the shape is torch.Size([64, 384, 1, 1]) in current model.
size mismatch for features.11.expand1x1.weight: copying a param of torch.Size([80, 64, 1, 1]) from checkpoint, where the shape is torch.Size([256, 64, 1, 1]) in current model.
size mismatch for features.11.expand1x1.bias: copying a param of torch.Size([80]) from checkpoint, where the shape is torch.Size([256]) in current model.
size mismatch for features.11.expand3x3.weight: copying a param of torch.Size([64, 64, 3, 3]) from checkpoint, where the shape is torch.Size([256, 64, 3, 3]) in current model.
size mismatch for features.11.expand3x3.bias: copying a param of torch.Size([64]) from checkpoint, where the shape is torch.Size([256]) in current model.
size mismatch for features.12.squeeze.weight: copying a param of torch.Size([64, 144, 1, 1]) from checkpoint, where the shape is torch.Size([64, 512, 1, 1]) in current model.
size mismatch for features.12.expand1x1.weight: copying a param of torch.Size([35, 64, 1, 1]) from checkpoint, where the shape is torch.Size([256, 64, 1, 1]) in current model.
size mismatch for features.12.expand1x1.bias: copying a param of torch.Size([35]) from checkpoint, where the shape is torch.Size([256]) in current model.
size mismatch for features.12.expand3x3.weight: copying a param of torch.Size([20, 64, 3, 3]) from checkpoint, where the shape is torch.Size([256, 64, 3, 3]) in current model.
size mismatch for features.12.expand3x3.bias: copying a param of torch.Size([20]) from checkpoint, where the shape is torch.Size([256]) in current model.
size mismatch for classifier.1.weight: copying a param of torch.Size([2, 55, 1, 1]) from checkpoint, where the shape is torch.Size([2, 512, 1, 1]) in current model.
[phung@archlinux SqueezeNet-Pruning]$