primepake commited on
Commit
5805255
·
1 Parent(s): 3c4e358

validate data

Browse files
speech/cosyvoice/utils/executor.py CHANGED
@@ -104,8 +104,8 @@ class Executor:
104
 
105
  if (
106
  info_dict.get("save_per_step", -1) > 0
107
- and (self.step + 1) % info_dict["save_per_step"] == 0
108
- and (batch_idx + 1) % info_dict["accum_grad"] == 0
109
  ):
110
  if dist.is_initialized():
111
  dist.barrier()
 
104
 
105
  if (
106
  info_dict.get("save_per_step", -1) > 0
107
+ and (self.step) % info_dict["save_per_step"] == 0
108
+ and (batch_idx) % info_dict["accum_grad"] == 0
109
  ):
110
  if dist.is_initialized():
111
  dist.barrier()
speech/tools/validate_data.py CHANGED
File without changes
speech/train.py CHANGED
@@ -211,6 +211,7 @@ def main():
211
  start_step, start_epoch = 0, -1
212
  if args.checkpoint is not None:
213
  if os.path.exists(args.checkpoint):
 
214
  state_dict = torch.load(args.checkpoint, map_location="cpu")
215
  model.load_state_dict(state_dict, strict=False)
216
  if "step" in state_dict:
 
211
  start_step, start_epoch = 0, -1
212
  if args.checkpoint is not None:
213
  if os.path.exists(args.checkpoint):
214
+ logger.info(f"Load checkpoint from {args.checkpoint}")
215
  state_dict = torch.load(args.checkpoint, map_location="cpu")
216
  model.load_state_dict(state_dict, strict=False)
217
  if "step" in state_dict: