automl icon indicating copy to clipboard operation
automl copied to clipboard

pretrained-model load ERROR!

Open HK017 opened this issue 6 years ago • 5 comments

OP_REQUIRES failed at save_restore_v2_ops.cc:184 : Not found: Key box_net/box-0-bn-3/beta/Momentum not found in checkpoint

pre-training model loading error,please help me,thanks a lot!!!

HK017 avatar Mar 25 '20 12:03 HK017

my tensorflow is 1.15.2 or 2.1.0 , both tf versions reporte this error.

HK017 avatar Mar 25 '20 13:03 HK017

my tensorflow is 1.15.2 or 2.1.0 , both tf versions reporte this error.

The model only support inference. You could download efficientnet pretrained ckpt as backbone ckpt.

fsx950223 avatar Mar 25 '20 13:03 fsx950223

I can repro this. This is the full error for reference:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/tensorflow/python/client/session.py", line 1365, in _do_call
    return fn(*args)
  File "/usr/local/lib/python3.7/dist-packages/tensorflow/python/client/session.py", line 1350, in _run_fn
    target_list, run_metadata)
  File "/usr/local/lib/python3.7/dist-packages/tensorflow/python/client/session.py", line 1443, in _call_tf_sessionrun
    run_metadata)
tensorflow.python.framework.errors_impl.NotFoundError: From /job:worker/replica:0/task:0:
Key box_net/box-0-bn-3/beta/Momentum not found in checkpoint
	 [[{{node save/RestoreV2}}]]

From inspecting the training checkoint, box_net/box-0-bn-3/beta/Momentum is definitely not in the checkpoint, so the code is working fine.

The issue seems to be, like @fsx950223 said, that the checkpoints only support inference, not training.

Ely-S avatar Mar 25 '20 19:03 Ely-S

@Ely-S you can use the efficientnet pretrained ckpt https://github.com/tensorflow/tpu/tree/master/models/official/efficientnet and use the --backbone_ckpt param to restore the checkpoint

roadcode avatar Mar 25 '20 19:03 roadcode

@fsx950223 @Ely-S @roadcode Thanks a lot, I have solved my problem

HK017 avatar Mar 26 '20 04:03 HK017