游雁
2024-02-21 8ea5f1302d1eb64ac1c00799c83b50f15c793633
update train recipe
1个文件已修改
4 ■■■■ 已修改文件
funasr/train_utils/trainer.py 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
funasr/train_utils/trainer.py
@@ -108,7 +108,7 @@
        filename = os.path.join(self.output_dir, f'model.pt.ep{epoch}')
        torch.save(state, filename)
        
        print(f'Checkpoint saved to {filename}')
        print(f'\nCheckpoint saved to {filename}\n')
        latest = Path(os.path.join(self.output_dir, f'model.pt'))
        torch.save(state, latest)
@@ -181,7 +181,7 @@
            time2 = time.perf_counter()
            time_escaped = (time2 - time1)/3600.0
            print(f"time_escaped_epoch: {time_escaped:.3f} hours, estimated to finish: {(self.max_epoch-epoch)*time_escaped:.3f}")
            print(f"\ntime_escaped_epoch: {time_escaped:.3f} hours, estimated to finish {self.max_epoch} epoch: {(self.max_epoch-epoch)*time_escaped:.3f}\n")
        if self.rank == 0:
            average_checkpoints(self.output_dir, self.avg_nbest_model)