fengju514 / Face-Pose-Net

Estimate 3D face pose (6DoF) or 11 parameters of 3x4 projection matrix by a Convolutional Neural Network
501 stars 109 forks source link

Does use_gpu flag have any effect? #3

Closed ghost closed 6 years ago

ghost commented 7 years ago

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?

fengju514 commented 6 years ago

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