ptran1203 / pytorch-animeGAN

Pytorch implementation of AnimeGAN for fast photo animation
163 stars 41 forks source link

Training triggers cuda out of memory #6

Closed muruga86 closed 9 months ago

muruga86 commented 2 years ago

Training triggers cuda out of memory, any workaround available?

murugan86@murugan86-IdeaPad-Gaming3-15ARH05D:~/anime/AnimeGenDir/animagen-pytorch-mur/pytorch-animeGAN$ python3 train.py --dataset Kimetsu --batch 6 --init-epochs 4 --checkpoint-dir {ckp_dir} --save-image-dir {save_img_dir} --save-interval 1 --gan-loss lsgan --init-lr 0.0001 --lr-g 0.00002 --lr-d 0.00004 --wadvd 10.0 --wadvg 10.0 --wcon 1.5 --wgra 3.0 --wcol 30.0

==== Train Config ====

dataset Kimetsu data_dir /content/dataset epochs 100 init_epochs 4 batch_size 6 checkpoint_dir {ckp_dir} save_image_dir {save_img_dir} gan_loss lsgan resume False use_sn False save_interval 1 debug_samples 0 lr_g 2e-05 lr_d 4e-05 init_lr 0.0001 wadvg 10.0 wadvd 10.0 wcon 1.5 wgra 3.0 wcol 30.0 d_layers 3 d_noise False

ptran1203 commented 2 years ago

try reduce batch-size, 4Gb GPU seems too small