hello, I want to use gpu for src/compare.py, and I modify the code as follow:
with tf.Graph().as_default(),tf.device('/gpu:0'):
but it shows error:
compare.py :56 'main' in facenet.load_model(model_dir, meta_file, ckpt_file)
facenet.py :369 'load_model' in saver.restore(tf.get_default_session(), os.path.join(model_dir_exp, ckpt_file))
/home/xxx/local/anaconda2/lib/python2.7/site-packages/tensorflow/python/training/saver.py:1428 'restore' in {self.saver_def.filename_tensor_name: save_path})
/home/xxx/local/anaconda2/lib/python2.7/site-packages/tensorflow/python/client/session.py:767 'run' in run_metadata_ptr)
/home/xxx/local/anaconda2/lib/python2.7/site-packages/tensorflow/python/client/session.py:965 '_run' in feed_dict_string, options, run_metadata)
/home/xxx/local/anaconda2/lib/python2.7/site-packages/tensorflow/python/client/session.py:1015 '_do_run' in target_list, options, run_metadata)
/home/xxx/local/anaconda2/lib/python2.7/site-packages/tensorflow/python/client/session.py:1035 '_do_call' in raise type(e)(node_def, op, message)
how should I use the gpu in this py to compare two face images?
thank you very much!
Hi @IvyGongoogle,
I usually use the CUDA_VISIBLE_DEVICES environment variable. Have you tried that?
@davidsandberg hello, sorry to reply late. Thank you very much!
Most helpful comment
Hi @IvyGongoogle,
I usually use the CUDA_VISIBLE_DEVICES environment variable. Have you tried that?