mirror of
https://github.com/modelscope/FunASR
synced 2025-09-15 14:48:36 +08:00
update trainer
This commit is contained in:
parent
ee3e3ff570
commit
d6431252dc
@ -1,12 +0,0 @@
|
||||
|
||||
#model="damo/emotion2vec_base"
|
||||
model="iic/emotion2vec_base_finetuned"
|
||||
model_revision="v2.0.4"
|
||||
|
||||
python funasr/bin/inference.py \
|
||||
+model=${model} \
|
||||
+model_revision=${model_revision} \
|
||||
+input="https://isv-data.oss-cn-hangzhou.aliyuncs.com/ics/MaaS/ASR/test_audio/asr_example_zh.wav" \
|
||||
+output_dir="./outputs/debug" \
|
||||
+extract_embedding=False \
|
||||
+device="cpu" \
|
||||
@ -181,7 +181,7 @@ class Trainer:
|
||||
|
||||
time2 = time.perf_counter()
|
||||
time_escaped = (time2 - time1)/3600.0
|
||||
print(f"\nrank: {self.local_rank}, time_escaped_epoch: {time_escaped:.3f} hours, estimated to finish {self.max_epoch} epoch: {(self.max_epoch-epoch)*time_escaped:.3f}\n")
|
||||
print(f"\nrank: {self.local_rank}, time_escaped_epoch: {time_escaped:.3f} hours, estimated to finish {self.max_epoch} epoch: {(self.max_epoch-epoch)*time_escaped:.3f} hours\n")
|
||||
|
||||
if self.rank == 0:
|
||||
average_checkpoints(self.output_dir, self.avg_nbest_model)
|
||||
@ -293,7 +293,7 @@ class Trainer:
|
||||
f"{time_now}, "
|
||||
f"rank: {self.local_rank}, "
|
||||
f"epoch: {epoch}/{self.max_epoch}, "
|
||||
f"step: {batch_idx+1}/{len(self.dataloader_train)}, total: {self.batch_total}, "
|
||||
f"step: {batch_idx+1}/{len(self.dataloader_train)}, total step: {self.batch_total}, "
|
||||
f"(loss: {loss.detach().cpu().item():.3f}), "
|
||||
f"(lr: {lr:.3e}), "
|
||||
f"{[(k, round(v.cpu().item(), 3)) for k, v in stats.items()]}, "
|
||||
|
||||
Loading…
Reference in New Issue
Block a user