fengju514/Face-Pose-Net

Does use_gpu flag have any effect?

Closed this issue · 1 comments

in the esimatePose function:

## Force TF to use CPU oterwise we set the ID of the string of GPU we wanna use but here we are going use CPU
os.environ['CUDA_VISIBLE_DEVICES'] = '1' #e.g. str(FLAGS.gpu_id)# '7'
if use_gpu == False:
    dev = '/cpu:0'
    print("Using CPU")
elif use_gpu == True:
    dev = '/gpu:0'
    print("Using GPU " + os.environ['CUDA_VISIBLE_DEVICES'])
else:
    raise ValueError('Only support 0 or 1 gpu.')

the code change the dev variable, but is dev be used anywhere else?

No, dev is only used in the 6DoF head pose estimation.