Model Fine-Tuner

class condensa.finetune.FineTuner(w, layer_types=None, biases=True)

Condensa model fine-tuner. Can be used for retraining compressed models while keeping all zero-valued parameters clipped to zero.

__init__(w, layer_types=None, biases=True)

Initialize self. See help(type(self)) for accurate signature.

run(epochs, lr, lr_end, momentum, weight_decay, criterion, trainloader, testloader, valloader, debugging_flags={})

Fine-tunes a compressed model. Currently only supports SGD.

Parameters
  • epochs (int) – Number of epochs

  • lr (float) – Learning rate

  • lr_end (float) – End learning rate

  • momentum (float) – Momentum

  • weight_decay (float) – Weight decay

  • criterion – Loss criterion

  • trainloader – Training dataloader

  • testloader – Test dataloader

  • valloader – Validation dataloader

  • debugging_flags (dict) – Debugging flags