wyhsirius / LIA

[ICLR 22, TPAMI 24] Latent Image Animator
https://wyhsirius.github.io/LIA-project/
Other
585 stars 63 forks source link

Tranining problems #9

Closed Amazingren closed 2 years ago

Amazingren commented 2 years ago

Hey @wyhsirius, I was training the model on 4gpus, Have you met the following problem:

1) When I directly train start from 0, I can use batch_size=32 to train the model without any problem, image

2) However, when I want to train the model with --resume_ckpt, it shows like below, and I can just use very small batch size to avoid the out of memory problem : image

I would appreciate it if you can share me some suggestion to solve this problem~

Bests,

Amazingren commented 2 years ago

Hey guys, if you have the same problem. just change

 ckpt = torch.load(resume_ckpt)

to

 ckpt = torch.load(resume_ckpt, map_location='cpu')

in the trainer.py file.