TachibanaYoshino / AnimeGANv2

[Open Source]. The improved version of AnimeGAN. Landscape photos/videos to anime
5.06k stars 709 forks source link

add TensorFlow option for GPU has smaller memory #42

Open NaotakaKawata opened 2 years ago

NaotakaKawata commented 2 years ago

Hi. I tried train.py on a GPU with smaller memory. This GPU is RTX 2070 SUPER (8GB).

I got a memory error on line 274 of AnimeGanv2.py even though I set the batch size small.

After investigating, it seems that there is a bug in the memory allocation of Tensorflow. https://www.reddit.com/r/MachineLearning/comments/ea083i/d_tensorflow_gpu_memory_management_tf_force_gpu/

Therefore, I fixed.

I think it's difficult to reproduce the bug, but I hope it helps someone.Thanks!