realcause icon indicating copy to clipboard operation
realcause copied to clipboard

gpu support for train_generator.py

Open CW-Huang opened this issue 4 years ago • 5 comments

@51N84D can you assess the need for this? for the smaller datasets cpu will be enough, and it's fairly fast. I'm not sure for bigger datasets (e.g. LBIDD) whether it will take too much time.

CW-Huang avatar Aug 30 '20 19:08 CW-Huang

Yeah, I'll check it out

51N84D avatar Aug 30 '20 20:08 51N84D

@CW-Huang I'm getting NaN losses trying to run an experiment with lbidd:

2020-08-30 23:56:24.873470 / Iteration 200: nan nan 2020-08-30 23:56:25.062086 / Iteration 200 valid loss nan

Here is the script I'm using: python train_generator.py --dataroot=/Users/Sunsmeister/Desktop/Research/Causal/causal-benchmark/datasets --data=lbidd_quadratic_50k --dist='LogLogistic' --dim_h=256 --n_hidden_layers=2 --batch_size=128 --lr=0.0005

Have you been able to successfully run an experiment on lbidd? If so, could you share your script / params?

51N84D avatar Aug 31 '20 03:08 51N84D

that's probably because log-logistic is supported on R_>0, and lbidd has data <=0.

CW-Huang avatar Aug 31 '20 03:08 CW-Huang

Good call, that was it. I'm able to run an exp in ~8 min on CPU with this script:

python train_generator.py --dataroot=/Users/Sunsmeister/Desktop/Research/Causal/causal-benchmark/datasets --data=lbidd_quadratic_50k --dist='FactorialGaussian' --dim_h=256 --n_hidden_layers=2 --batch_size=128 --lr=0.0005

51N84D avatar Aug 31 '20 13:08 51N84D

Is the code currently set up to train on GPU? If not, I can work on that

51N84D avatar Aug 31 '20 13:08 51N84D