This is my experiment eviroument
- python3.10
- pytorch2.3.0+cu121
- numpy 1.26.4
- torchvision 0.18.0
$ cd REQuant
Support cifar10 and cifar100 dataset from torchvision since it's more convenient.
You need to specify the net you want to train using arg -net
$ python train.py -net resnet18 -dataset cifar10 -batch 128
sometimes, you might want to use warmup training by set -warm
to 1 or 2, to prevent network
diverge during early training phase.
The supported net args are:
inceptionv3
inceptionv4
resnet18
resnet34
resnet50
resnet101
$ python test_uniform.py -net resnet18 -model_path path_to_resnet18_weights_file -dataset cifar10 -bit 4 -batch 128
$ python test_nonuniform.py -net resnet18 -model_path path_to_resnet18_weights_file -dataset cifar10 -bit 4 -batch 128