def unpack_checkpoint(chkpt):
    """Unpacks a checkpoint.

    Args:
        checkpoint: Checkpoint previously saved by calling save_checkpoint.

    Returns:
        epoch (int): Epoch number.
        encoder (encoder.Encoder): Encoder model
        decoder: Decoder model
        encoder_optimizer: optimizer to update encoder's weights, if fine-tuning
        decoder_optimizer: optimizer to update decoder's weights
        metrics (dict): Dictionary of metrics.
    """
    
    return chkpt['epoch'], chkpt['encoder'], chkpt['decoder'], chkpt['encoder_optimizer'], chkpt['decoder_optimizer'], chkpt['metrics']