primepake / wav2lip_288x288

MIT License
560 stars 143 forks source link

AttributeError: 'HParams' object has no attribute num_checkpoints #95

Closed einsqing closed 9 months ago

einsqing commented 9 months ago

Traceback (most recent call last): File ".\train_syncnet_sam.py", line 418, in run() File ".\train_syncnet_sam.py", line 411, in run train(device, model, train_data_loader,test_data_loader, optimizer, File ".\train_syncnet_sam.py", line 248, in train save_checkpoint(model, optimizer, global_step, checkpoint_dir, global_epoch, eval_loss) File ".\train_syncnet_sam.py", line 329, in save_checkpoint num_ckpts = hparams.num_checkpoints File "C:\Users\heqing\Desktop\wav2lip_288x288\hparams.py", line 23, in getattr raise AttributeError("'HParams' object has no attribute %s" % key) AttributeError: 'HParams' object has no attribute num_checkpoints

Nyquist0 commented 9 months ago

I think you could directly add the attribute num_checkpoints in the correct place of the file hparams.py by yourself. This attribute is to limit the max number of saved ckpt files.