alldbi / FLM

Tensorflow implementation of Fast Geometrically-Perturbed Adversarial Faces
MIT License
24 stars 5 forks source link

Model File/Arguments Mismatch #1

Closed ss32 closed 5 years ago

ss32 commented 5 years ago

I'm attempting to run the provided model and noticed that the arguments in main.py differ from the ones listed in the README, particularly method-->mode. But more importantly, the provided model files do not match the model shown as the default. The list of files provided by the pretrained model are:

20180408-102900.pb
model-20180408-102900.ckpt-90.data-00000-of-00001
model-20180408-102900.ckpt-90.index
model-20180408-102900.meta

And the default points to a file named model-20180408-102900.ckpt-90. I have tried running with all of them and the most relevant error I see is

NotFoundError (see above for traceback): Restoring from checkpoint failed. This is most likely due to a Variable name or other graph key that is missing from the checkpoint. Please ensure that you have not altered the graph expected based on the checkpoint. Original error:

Tensor name "InceptionResnetV1/Block8/Branch_0/Conv2d_1x1/BatchNorm/beta" not found in checkpoint files ./models/20180408-102900/model-20180408-102900.ckpt-90.index
     [[node save/RestoreV2 (defined at main.py:134) ]]

Do you have the original model files used for the experiments in your paper?

Louis14lan commented 5 years ago

I'm attempting to run the provided model and noticed that the arguments in main.py differ from the ones listed in the README, particularly method-->mode. But more importantly, the provided model files do not match the model shown as the default. The list of files provided by the pretrained model are:

20180408-102900.pb
model-20180408-102900.ckpt-90.data-00000-of-00001
model-20180408-102900.ckpt-90.index
model-20180408-102900.meta

And the default points to a file named model-20180408-102900.ckpt-90. I have tried running with all of them and the most relevant error I see is

NotFoundError (see above for traceback): Restoring from checkpoint failed. This is most likely due to a Variable name or other graph key that is missing from the checkpoint. Please ensure that you have not altered the graph expected based on the checkpoint. Original error:

Tensor name "InceptionResnetV1/Block8/Branch_0/Conv2d_1x1/BatchNorm/beta" not found in checkpoint files ./models/20180408-102900/model-20180408-102900.ckpt-90.index
   [[node save/RestoreV2 (defined at main.py:134) ]]

Do you have the original model files used for the experiments in your paper?

yeah,i meet the same problem. Did you solve it?

alldbi commented 5 years ago

@ss32 @Louis14lan Hi friends! I am sorry for the delay I am such busy these days that I have not noticed your issue. You should use the address of ".index" file and then remove the ".index". For instance, in my case, the address to the checkpoint on my machine is: ".../model-20180408-102900.ckpt-90.index" and so I did: ".../model-20180408-102900.ckpt-90". If it is not working then you have to check the version of Tensorflow and Python. I tried with Tensorflow 1.4.0 and Python 2.7 right now and everything is fine. Please let me know if the problem is still there. I can rewrite some part of the code to reduce such problems.

Louis14lan commented 5 years ago

@alldbi thanks for your reply. I had resolved it. I changed the pretrained model' path from relative path to absolute path, it went well.

ss32 commented 5 years ago

@alldbi thanks! Removing .index solved this for me.