self-attention-gan icon indicating copy to clipboard operation
self-attention-gan copied to clipboard

How to train on only one GPU?

Open carshadi opened this issue 6 years ago • 2 comments

Hello, Which parameters do I need to change to make this train and evaluate on one GPU? I am currently getting an OOM Resource Exhausted Error when i try to train on one GTX 1080. I tried setting num_towers=1 in train_imagenet.py but this did not help.

carshadi avatar Dec 24 '18 03:12 carshadi

Also tried reducing the batch size to 32,16,etc but the program got stuck before even starting to iterate

carshadi avatar Dec 24 '18 05:12 carshadi

@carshadi, hi https://github.com/brain-research/self-attention-gan/blob/ad9612e60f6ba2b5ad3d3340ebae60f724636d75/train_imagenet.py#L124

did you try config.gpu_options.allow_growth=True ? or config.gpu_options.per_process_gpu_memory_fraction = 0.4

ArashHosseini avatar Feb 20 '19 14:02 ArashHosseini