GithubHelp home page GithubHelp logo

Comments (16)

GangqiangZhao avatar GangqiangZhao commented on April 30, 2024

The similar problem encountered when I am try to import the "model.ckpt-500000" mode:

Not found: Tensor name "incept3c/in3_conv5x5_19/weights/ExponentialMovingAverage_1" not found in checkpoint files

from facenet.

nbenhaim avatar nbenhaim commented on April 30, 2024

I reverted the validate_on_lfw.py to the version which loads the model without needing the meta file, and it worked. It appears as if the provided meta file is not compatible with the trained ckpt model file. If you load the model by creating variables using the call to inference and then restoring all the variables, it works

from facenet.

GangqiangZhao avatar GangqiangZhao commented on April 30, 2024

Great, thanks. But how to change the validate_on_lfw.py file?

from facenet.

nbenhaim avatar nbenhaim commented on April 30, 2024

i looked at this revision and changed my file based on this - load the model as he was doing it before this change

d17aa06

from facenet.

davidsandberg avatar davidsandberg commented on April 30, 2024

This is a bit strange. Just to make sure I understand correctly... On the wiki there is a link to a zip file that contains both the model parameters and the meta-file (that contains the model definition). Are you using this meta-file?
Here is what it looks like when extracted:

david@deeplab1:~/datasets$ ls -al ~/Downloads/20160514-234418/
total 88256
drwxrwxr-x 2 david david     4096 jul 19 08:27 .
drwxr-xr-x 6 david david    12288 jul 19 08:27 ..
-rw------- 1 david david 83731015 jul  8 00:13 model.ckpt-500000
-rw------- 1 david david  6616113 jul  8 00:13 model.ckpt-500000.meta

And when I run validate_on_lfw.py i set the parameter
--model_file ~/Downloads/20160514-234418/model.ckpt-500000
And when I run this it loads the model without any problems.

from facenet.

GangqiangZhao avatar GangqiangZhao commented on April 30, 2024

I am sure the same model and meta data is used.

from facenet.

nbenhaim avatar nbenhaim commented on April 30, 2024

@davidsandberg , I downloaded the exact zip file you reference, and I get an error related to a variable ExponentialMovingAverage_1 not being found just as @GangqiangZhao described as well. I can try again later to double check

from facenet.

davidsandberg avatar davidsandberg commented on April 30, 2024

Which Tensorflow release are you using? I'm on TF r0.9. I'm not sure that this problem is related to tensorflow release but I have difficulties seeing what else it could be.

from facenet.

GangqiangZhao avatar GangqiangZhao commented on April 30, 2024

I am using the master version in Github.

from facenet.

GangqiangZhao avatar GangqiangZhao commented on April 30, 2024

After updating the numpy to 1.11 version, I am finally able to complete the lfw validation on Tensorflow version r0.8. It looks like the problem is caused by the different version of tensorflow and some unknown tensorflow install setup.

from facenet.

davidsandberg avatar davidsandberg commented on April 30, 2024

I reverted to TF r0.8 and it's still working fine. I'm on numpy 1.10.2.

from facenet.

Jinwoo-Jeon avatar Jinwoo-Jeon commented on April 30, 2024

I was on gtx1080, cuda8.0, TF r0.9 and numpy 1.11 version. I was also experiencing same error. But after downgrading TF to r0.8 it works fine with the last commit.

77b66a2

from facenet.

stgzr avatar stgzr commented on April 30, 2024

Maybe it is caused by different version of tensorflow?
For my case, when I execute validate_on_lfw.py using tensorflow r0.9, I met serveral errors as follows:

......
W tensorflow/core/framework/op_kernel.cc:936] Not found: Tensor name "incept4e/in2_conv3x3_45/batch_norm/batch_norm/gamma/ExponentialMovingAverage_1" not found in checkpoint files models/model.ckpt-500000
[[Node: ema_restore/restore_slice_447 = RestoreSlice[dt=DT_FLOAT, preferred_shard=-1, _device="/job:localhost/replica:0/task:0/cpu:0"](_recv_ema_restore/Const_0, ema_restore/restore_slice_447/tensor_name, ema_restore/restore_slice_447/shape_and_slice)]]
E tensorflow/core/client/tensor_c_api.cc:485] Tensor name "incept4e/in2_conv3x3_45/batch_norm/batch_norm/gamma/ExponentialMovingAverage_1" not found in checkpoint files models/model.ckpt-500000
[[Node: ema_restore/restore_slice_447 = RestoreSlice[dt=DT_FLOAT, preferred_shard=-1, _device="/job:localhost/replica:0/task:0/cpu:0"](_recv_ema_restore/Const_0, ema_restore/restore_slice_447/tensor_name, ema_restore/restore_slice_447/shape_and_slice)]]
[[Node: ema_restore/restore_slice_462/_84 = _Recvclient_terminated=false, recv_device="/job:localhost/replica:0/task:0/gpu:2", send_device="/job:localhost/replica:0/task:0/cpu:0", send_device_incarnation=1, tensor_name="edge_3252_ema_restore/restore_slice_462", tensor_type=DT_FLOAT, _device="/job:localhost/replica:0/task:0/gpu:2"]]
......

While after I uninstalled r0.9 and rollback to tensorflow r0.8, it is working fine now.

from facenet.

LiuzcEECS avatar LiuzcEECS commented on April 30, 2024

I think the issue might have been solved since some problem of function load_model() in facenet.py has been fixed.

from facenet.

lbg940131 avatar lbg940131 commented on April 30, 2024

I don't know why "images_placeholder.get_shape()[1]" returns (?,?)
Is anyone getting the same error?

from facenet.

LiuzcEECS avatar LiuzcEECS commented on April 30, 2024

@lbg940131 I thought the "?" might mean the size can be changed according to the number of the images you feed

from facenet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.