Open BITACC opened 2 years ago
Can you just call setup_multi_gpus()
inside your create_model
function?
You can pass the keep_temp argument to optim.minimize
and examine the python file produced to see what variables are being created.
Yeah, that s what one should do, but the issue with not recognizing the global variable remains.
Helo there, I have the following code. a global variable that num_gpu that indicates the number of gpus availavle. If I can data() or create_mode() separate everything is fine. But when I call optim.minimize and pass the function, it does not see the global variable and num_gpu becomes undfined. Am I doing something wrong? Thanks in advance. ...