-
- Downloads
Load optimizer from checkpoint (BREAKING - see details) (#182)
Load optimizer from checkpoint (BREAKING - see details) (#182) * Fixes issues #70, #145 and replaces PR #74 * checkpoint.py * save_checkpoint will now save the optimizer type in addition to its state * load_checkpoint will now instantiate an optimizer based on the saved type and load its state * config.py: file/dict_config now accept the resumed epoch to pass to LR schedulers * policy.py: LRPolicy now passes the current epoch to the LR scheduler * Classifier compression sample * New flag '--resume-from' for properly resuming a saved training session, inc. optimizer state and epoch # * Flag '--reset-optimizer' added to allow discarding of a loaded optimizer. * BREAKING: * Previous flag '--resume' is deprecated and is mapped to '--resume-from' + '--reset-optimizer'. * But, old resuming behavior had an inconsistency where the epoch count would continue from the saved epoch, but the LR scheduler was setup as if we were starting from epoch 0. * Using '--resume-from' + '--reset-optimizer' now will simply RESET the epoch count to 0 for the whole environment. * This means that scheduling configurations (in YAML or code) which assumed use of '--resume' might need to be changed to reflect the fact that the epoch count now starts from 0 * All relevant YAML files under 'examples' modified to reflect this change * Initial support for ReduceLROnPlateau (#161): * Allow passing **kwargs to policies via the scheduler * Image classification now passes the validation loss to the scheduler, to be used yo ReduceLROnPlateau * The current implementation is experimental and subject to change
Showing
- distiller/apputils/checkpoint.py 51 additions, 7 deletionsdistiller/apputils/checkpoint.py
- distiller/config.py 5 additions, 4 deletionsdistiller/config.py
- distiller/policy.py 11 additions, 6 deletionsdistiller/policy.py
- distiller/scheduler.py 6 additions, 6 deletionsdistiller/scheduler.py
- distiller/thinning.py 13 additions, 7 deletionsdistiller/thinning.py
- distiller/utils.py 4 additions, 0 deletionsdistiller/utils.py
- examples/agp-pruning/mobilenet.imagenet.schedule_agp.yaml 8 additions, 7 deletionsexamples/agp-pruning/mobilenet.imagenet.schedule_agp.yaml
- examples/agp-pruning/resnet20_filters.schedule_agp.yaml 9 additions, 9 deletionsexamples/agp-pruning/resnet20_filters.schedule_agp.yaml
- examples/agp-pruning/resnet20_filters.schedule_agp_2.yaml 6 additions, 7 deletionsexamples/agp-pruning/resnet20_filters.schedule_agp_2.yaml
- examples/agp-pruning/resnet20_filters.schedule_agp_3.yaml 11 additions, 11 deletionsexamples/agp-pruning/resnet20_filters.schedule_agp_3.yaml
- examples/agp-pruning/resnet20_filters.schedule_agp_4.yaml 11 additions, 12 deletionsexamples/agp-pruning/resnet20_filters.schedule_agp_4.yaml
- examples/classifier_compression/compress_classifier.py 44 additions, 17 deletionsexamples/classifier_compression/compress_classifier.py
- examples/classifier_compression/parser.py 28 additions, 12 deletionsexamples/classifier_compression/parser.py
- examples/network_surgery/resnet20.network_surgery.yaml 4 additions, 4 deletionsexamples/network_surgery/resnet20.network_surgery.yaml
- examples/network_trimming/resnet56_cifar_activation_apoz.yaml 11 additions, 12 deletions...ples/network_trimming/resnet56_cifar_activation_apoz.yaml
- examples/network_trimming/resnet56_cifar_activation_apoz_v2.yaml 11 additions, 11 deletions...s/network_trimming/resnet56_cifar_activation_apoz_v2.yaml
- examples/pruning_filters_for_efficient_convnets/resnet56_cifar_channel_rank.yaml 7 additions, 7 deletions...s_for_efficient_convnets/resnet56_cifar_channel_rank.yaml
- examples/pruning_filters_for_efficient_convnets/resnet56_cifar_filter_rank.yaml 7 additions, 7 deletions...rs_for_efficient_convnets/resnet56_cifar_filter_rank.yaml
- examples/pruning_filters_for_efficient_convnets/resnet56_cifar_filter_rank_v2.yaml 7 additions, 7 deletions...for_efficient_convnets/resnet56_cifar_filter_rank_v2.yaml
- examples/ssl/ssl_channels-removal_finetuning.yaml 2 additions, 2 deletionsexamples/ssl/ssl_channels-removal_finetuning.yaml
Loading
Please register or sign in to comment