tianyic / only_train_once

OTOv1-v3, NeurIPS, ICLR, TMLR, DNN Training, Compression, Structured Pruning, Erasing Operators, CNN, Diffusion, LLM

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

New tutorials problem resnet50_imagenet.ipynb

Miocio-nora opened this issue · comments

 if accuracy1 > best_acc_1:
            best_acc_1 = accuracy1
             torch.save(model, os.path.join(ckpt_dir, 'best_epoch_' + str(epoch) + '_' + str(t) + '.pt'))

The code computing best_acc_1 might have problems.
If those epochs before start_prune_epoch have already reached highest acc, this code might won't refresh Best_acc after pruning ,if it can't get any higher then before it pruned.

@Miocio-nora Good catch. Please feel free to create a PR to the tutorial for a fix. Thanks.