Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

when I run IS_MY_FACE #11

Open
yangyangwill opened this issue Mar 20, 2018 · 9 comments
Open

when I run IS_MY_FACE #11

yangyangwill opened this issue Mar 20, 2018 · 9 comments

Comments

@yangyangwill
Copy link

File "G:/pycharm/untitled1/venv/is_my_face.py", line 145, in
saver.restore(sess, tf.train.latest_checkpoint('.'))
File "G:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\training\saver.py", line 1751, in restore
raise ValueError("Can't load save_path when it is None.")
ValueError: Can't load save_path when it is None.

How to tackle this problem? Thanks!

@GrinHHH
Copy link

GrinHHH commented Mar 22, 2018

I have this problem too,but what is wrong is in file "train_faces", after running that file you didn`t get the savepath,you could change the code like this:
saver.save(sess, './train_faces.model', global_step=n*num_batch+i)
sys.exit(0)
print ('saver done')
and you will see if u have generate the path.
if you find a way to solve(or to say generate the path),plz tell me ,thanks!

sorry ,i make a mistake here.
you should put the "print"before the function exit,or you won`t see the result either

@KalElSuper
Copy link

I have this problem too?Have you solved this problem?Please reply me,thank you!

@GrinHHH
Copy link

GrinHHH commented Mar 26, 2018

I ... emmm,delete the “if ”sentence at the end of the code,for that avoid me from generating the path...but i dont know why.there should be some reason in that sentence but i cant understand.You can try this way,but its not a good way to solve the prolem.

@KalElSuper
Copy link

Excuse me, can you explain it clearly? Which "if" should I remove?

@GrinHHH
Copy link

GrinHHH commented Mar 27, 2018

remove line 163,

if (n*num_batch+i) % 100 == 0

(i forget if this is the origin code,for i had changed it once)

and you could change the print in 161 and 166 to

`print(n*num_batch+i,loss,'loss')

print(n*num_batch+i,acc,'acc') `

then,if the acc>0.98,you will get the path

@KalElSuper
Copy link

That's great, this is working, thank you!

@yangyangwill
Copy link
Author

Thank you, but when I run this program if I use the other people's faces it will also terms out 'True'
Do you know why? Thank you so much!

@hbkcy
Copy link

hbkcy commented May 8, 2018

为什么按照楼上的方法,我没能得到解决

@zzzzjinxiang
Copy link

you don't have enough samples. Acc can't reach 0.95

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants