def restore_from_checkpoint(self, checkpoint): ''' Restores the MinibatchSource state from the specified checkpoint. Args: checkpoint (dict): checkpoint to restore from ''' super(MinibatchSource, self).restore_from_checkpoint(_py_dict_to_cntk_dict(checkpoint))
def save_checkpoint(self, filename, external_state={}): ''' Saves a checkpoint of the model and other Trainer state at the specified file location. In distributed environment the checkpointing is done by the main worker. Args: filename (str): filename to store the checkpoint. ''' super(Trainer, self).save_checkpoint(filename, _py_dict_to_cntk_dict(external_state))