shaoshitong / G_VBSM_Dataset_Condensation

[CVPR2024 highlight] Generalized Large-Scale Data Condensation via Various Backbone and Statistical Matching (G-VBSM)
21 stars 2 forks source link

wrong judgment condition of train epochs #4

Open j-cyoung opened 1 week ago

j-cyoung commented 1 week ago

As writen in the Branch_CIFAR_10/squeeze/squeeze.sh and the paper supplemental, the total epochs of pretrained model is 5

python train.py --model ResNet18 --dataset CIFAR-10 --data_path /path/to/cifar-10 --train_epochs 5

python train.py --model MobileNetV2 --dataset CIFAR-10 --data_path /path/to/cifar-10 --train_epochs 5

python train.py --model ShuffleNetV2_0_5 --dataset CIFAR-10 --data_path /path/to/cifar-10 --train_epochs 5

python train.py --model WRN_16_2 --dataset CIFAR-10 --data_path /path/to/cifar-10 --train_epochs 5

python train.py --model ConvNetW128 --dataset CIFAR-10 --data_path /path/to/cifar-10 --train_epochs 5

image

However it seems that the judgment condition in Branch_CIFAR_10/squeeze/train.py (line 121) cannot save the corresponding epoch:

        if e % 10 == 0:
            state_dict = model.state_dict()
            torch.save(state_dict,os.path.join(save_dir,f"squeeze_{args.model}.pth"))