dpressel / rude-carnie

Age detection in Tensorflow
937 stars 341 forks source link

export.py with error Key LeviHassner/conv1/biases not found in checkpoint #88

Closed magentay closed 5 years ago

magentay commented 6 years ago

I tried to export the checkpoint by export.py by running

python export.py \
--checkpoint rude-carnie/gender/21936/checkpoint \
--class_type gender \
--output_dir gender_model/1 \
--requested_step 14999

The error I got is:

NotFoundError (see above for traceback): Key LeviHassner/conv1/biases not found in checkpoint
     [[Node: save/RestoreV2 = RestoreV2[dtypes=[DT_FLOAT, DT_FLOAT, 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)]]

How to solve it?

dpressel commented 6 years ago

This is probably the same as #13

dakun333 commented 5 years ago

This is probably the same as,I've solved it,you can try: Change "model_fn = select_model(FLAGS.model_type)" in guess. py to "model_fn = select_model('inception3')"

dpressel commented 5 years ago

You shouldnt need to do that, just pass --model_type inception to the program as defined in the referenced ticket (#13)