keras_to_tensorflow icon indicating copy to clipboard operation
keras_to_tensorflow copied to clipboard

Restoring from checkpoint failed

Open tuji-sjp opened this issue 5 years ago • 3 comments

Hello, when I loaded my converted tf model, I got the following error, do you know what happened? Using keras, I fine-tuned the inception_resnet_v2 model and converted the saved .h5 model to tf's .pb model.


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:

Key InceptionResnetV2/AuxLogits/Conv2d_1b_1x1/BatchNorm/beta not found in checkpoint [[node save/RestoreV2 (defined at attack_iter.py:241) = RestoreV2[dtypes=[DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, ..., DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT], _device="/job:localhost/replica:0/task:0/device:CPU:0"](_arg_save/Const_0_0, save/RestoreV2/tensor_names, save/RestoreV2/shape_and_slices)]]

tuji-sjp avatar Sep 09 '19 08:09 tuji-sjp

@amir-abdi hello? anybody?

tuji-sjp avatar Sep 21 '19 18:09 tuji-sjp

@tuji-sjp Sorry for the late response. I don't have any solutions from the top of my mind. Please share the keras model you were trying to convert (I assume that it was a pretrained inception_resnet_v2, so, don't expect there to be any license issues). I will then start the inspection from there. Thanks.

amir-abdi avatar Sep 23 '19 22:09 amir-abdi

ok, where can I share it with you? In fact, I don't know how to load the transformed pb model in tensorflow, and I feel that direct loading is not usable.

tuji-sjp avatar Sep 26 '19 12:09 tuji-sjp