inference error
@Jupanlee
Hello,我想请问一下,我inference出现的错误是什么原因,以下是我的训练命令和inference命令
train : python main.py -mode=train --num_classer=53 --training_file_pattern=tfrecord/train-000* --model_name=efficientdet-d0 --model_dir=model --ckpt=efficientdet-d0 --train_batch_size=32 --eval_batch_size=8 --eval_samples=1024 --num_examples_per_epoch=1619 --num_epochs=2 --hparams="use_bfloat16=false,num_classes=53,moving_average_decay=0" --use_tpu=False
inference: python model_inspect.py --runmode=infer --model_name=efficientdet-d0 --ckpt_path=./model --max_boxes_to_draw=100 --min_score_thresh=0.2 --input_image=../automl/efficientdet/car01.jpeg --output_image_dir=tmp/ --num_classes=53 --input_image_size=512
inference error: 2020-04-16 18:15:19.945517: W tensorflow/core/framework/op_kernel.cc:1622] OP_REQUIRES failed at save_restore_v2_ops.cc:184 : Not found: Key box_net/box-0-bn-3/beta/ExponentialMovingAverage not found in checkpoint Traceback (most recent call last): File "/home/vcaadmin/miniconda3/envs/GEDet/lib/python3.6/site-packages/tensorflow_core/python/client/session.py", line 1365, in _do_call return fn(*args) File "/home/vcaadmin/miniconda3/envs/GEDet/lib/python3.6/site-packages/tensorflow_core/python/client/session.py", line 1350, in _run_fn target_list, run_metadata) File "/home/vcaadmin/miniconda3/envs/GEDet/lib/python3.6/site-packages/tensorflow_core/python/client/session.py", line 1443, in _call_tf_sessionrun run_metadata) tensorflow.python.framework.errors_impl.NotFoundError: 2 root error(s) found. (0) Not found: Key box_net/box-0-bn-3/beta/ExponentialMovingAverage not found in checkpoint [[{{node save/RestoreV2}}]] (1) Not found: Key box_net/box-0-bn-3/beta/ExponentialMovingAverage not found in checkpoint [[{{node save/RestoreV2}}]] [[save/RestoreV2/_301]] 0 successful operations. 0 derived errors ignored.
Hello,
ExponentialMovingAverage not found in checkpoint
Try the flag --enable_ema=False for inference. This seems to be a similar issue : https://github.com/google/automl/issues/249
python model_inspect.py --runmode=infer model_name=efficientdet-d0 --ckpt_path=efficientdet-d0 input_image_size=512 --max_boxes_to_draw=100 --min_score_thresh=0.2 --line_thickness=4 --saved_model_dir=/tmp/saved_model --input_image=img.png --output_image_dir=/tmp/ --enable_ema=False
I also tried python model_inspect.py --runmode=infer model_name=efficientdet-d0 --ckpt_path=efficientdet-d0 input_image_size=512 --max_boxes_to_draw=100 --min_score_thresh=0.2 --line_thickness=4 --saved_model_dir=/tmp/saved_model --input_image=img.png --output_image_dir=/tmp/ --enable_ema=False --num_classes=90
Still gives me an error
Key efficientnet-b1/blocks_0/conv2d/kernel not found in checkpoint [[node save/RestoreV2 (defined at /mnt/efficientdet/inference.py:144) ]]
Original stack trace for 'save/RestoreV2':
File "model_inspect.py", line 408, in
你更新一下代码看看,inference时候需要设置 --enable_ema=False
gtgtgt1117 [email protected] 于2020年4月17日周五 上午10:00写道:
@Jupanlee https://github.com/Jupanlee
Hello,我想请问一下,我inference出现的错误是什么原因,以下是我的训练命令和inference命令
train : python main.py -mode=train --num_classer=53 --training_file_pattern=tfrecord/train-000* --model_name=efficientdet-d0 --model_dir=model --ckpt=efficientdet-d0 --train_batch_size=32 --eval_batch_size=8 --eval_samples=1024 --num_examples_per_epoch=1619 --num_epochs=2 --hparams="use_bfloat16=false,num_classes=53,moving_average_decay=0" --use_tpu=False
inference: python model_inspect.py --runmode=infer --model_name=efficientdet-d0 --ckpt_path=./model --max_boxes_to_draw=100 --min_score_thresh=0.2 --input_image=../automl/efficientdet/car01.jpeg --output_image_dir=tmp/ --num_classes=53 --input_image_size=512
inference error: 2020-04-16 18:15:19.945517: W tensorflow/core/framework/op_kernel.cc:1622] OP_REQUIRES failed at save_restore_v2_ops.cc:184 : Not found: Key box_net/box-0-bn-3/beta/ExponentialMovingAverage not found in checkpoint Traceback (most recent call last): File "/home/vcaadmin/miniconda3/envs/GEDet/lib/python3.6/site-packages/tensorflow_core/python/client/session.py", line 1365, in _do_call return fn(*args) File "/home/vcaadmin/miniconda3/envs/GEDet/lib/python3.6/site-packages/tensorflow_core/python/client/session.py", line 1350, in _run_fn target_list, run_metadata) File "/home/vcaadmin/miniconda3/envs/GEDet/lib/python3.6/site-packages/tensorflow_core/python/client/session.py", line 1443, in _call_tf_sessionrun run_metadata) tensorflow.python.framework.errors_impl.NotFoundError: 2 root error(s) found. (0) Not found: Key box_net/box-0-bn-3/beta/ExponentialMovingAverage not found in checkpoint [[{{node save/RestoreV2}}]] (1) Not found: Key box_net/box-0-bn-3/beta/ExponentialMovingAverage not found in checkpoint [[{{node save/RestoreV2}}]] [[save/RestoreV2/_301]] 0 successful operations. 0 derived errors ignored.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/google/automl/issues/252, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEAD5FRDLYNZOE6ZRINGTB3RM6Z47ANCNFSM4MKMABMQ .
Hello, I have encountered the same problem as you. Have you solved it
@Jupanlee
Hello,我想请问一下,我inference出现的错误是什么原因,以下是我的训练命令和inference命令
train : python main.py -mode=train --num_classer=53 --training_file_pattern=tfrecord/train-000* --model_name=efficientdet-d0 --model_dir=model --ckpt=efficientdet-d0 --train_batch_size=32 --eval_batch_size=8 --eval_samples=1024 --num_examples_per_epoch=1619 --num_epochs=2 --hparams="use_bfloat16=false,num_classes=53,moving_average_decay=0" --use_tpu=False
inference: python model_inspect.py --runmode=infer --model_name=efficientdet-d0 --ckpt_path=./model --max_boxes_to_draw=100 --min_score_thresh=0.2 --input_image=../automl/efficientdet/car01.jpeg --output_image_dir=tmp/ --num_classes=53 --input_image_size=512
inference error: 2020-04-16 18:15:19.945517: W tensorflow/core/framework/op_kernel.cc:1622] OP_REQUIRES failed at save_restore_v2_ops.cc:184 : Not found: Key box_net/box-0-bn-3/beta/ExponentialMovingAverage not found in checkpoint Traceback (most recent call last): File "/home/vcaadmin/miniconda3/envs/GEDet/lib/python3.6/site-packages/tensorflow_core/python/client/session.py", line 1365, in _do_call return fn(*args) File "/home/vcaadmin/miniconda3/envs/GEDet/lib/python3.6/site-packages/tensorflow_core/python/client/session.py", line 1350, in _run_fn target_list, run_metadata) File "/home/vcaadmin/miniconda3/envs/GEDet/lib/python3.6/site-packages/tensorflow_core/python/client/session.py", line 1443, in _call_tf_sessionrun run_metadata) tensorflow.python.framework.errors_impl.NotFoundError: 2 root error(s) found. (0) Not found: Key box_net/box-0-bn-3/beta/ExponentialMovingAverage not found in checkpoint [[{{node save/RestoreV2}}]] (1) Not found: Key box_net/box-0-bn-3/beta/ExponentialMovingAverage not found in checkpoint [[{{node save/RestoreV2}}]] [[save/RestoreV2/_301]] 0 successful operations. 0 derived errors ignored.
Hello, I have encountered the same problem as you. Have you solved it
@Jupanlee Hello,我想请问一下,我inference出现的错误是什么原因,以下是我的训练命令和inference命令 train : python main.py -mode=train --num_classer=53 --training_file_pattern=tfrecord/train-000* --model_name=efficientdet-d0 --model_dir=model --ckpt=efficientdet-d0 --train_batch_size=32 --eval_batch_size=8 --eval_samples=1024 --num_examples_per_epoch=1619 --num_epochs=2 --hparams="use_bfloat16=false,num_classes=53,moving_average_decay=0" --use_tpu=False inference: python model_inspect.py --runmode=infer --model_name=efficientdet-d0 --ckpt_path=./model --max_boxes_to_draw=100 --min_score_thresh=0.2 --input_image=../automl/efficientdet/car01.jpeg --output_image_dir=tmp/ --num_classes=53 --input_image_size=512 inference error: 2020-04-16 18:15:19.945517: W tensorflow/core/framework/op_kernel.cc:1622] OP_REQUIRES failed at save_restore_v2_ops.cc:184 : Not found: Key box_net/box-0-bn-3/beta/ExponentialMovingAverage not found in checkpoint Traceback (most recent call last): File "/home/vcaadmin/miniconda3/envs/GEDet/lib/python3.6/site-packages/tensorflow_core/python/client/session.py", line 1365, in _do_call return fn(*args) File "/home/vcaadmin/miniconda3/envs/GEDet/lib/python3.6/site-packages/tensorflow_core/python/client/session.py", line 1350, in _run_fn target_list, run_metadata) File "/home/vcaadmin/miniconda3/envs/GEDet/lib/python3.6/site-packages/tensorflow_core/python/client/session.py", line 1443, in _call_tf_sessionrun run_metadata) tensorflow.python.framework.errors_impl.NotFoundError: 2 root error(s) found. (0) Not found: Key box_net/box-0-bn-3/beta/ExponentialMovingAverage not found in checkpoint [[{{node save/RestoreV2}}]] (1) Not found: Key box_net/box-0-bn-3/beta/ExponentialMovingAverage not found in checkpoint [[{{node save/RestoreV2}}]] [[save/RestoreV2/_301]] 0 successful operations. 0 derived errors ignored.
并没有解决,你解决了吗?
You can try to set arg --hparams="moving_average_decay=0" in predict image command
Hello, I have encountered the same problem as you. Have you solved it
@Jupanlee Hello,我想请问一下,我inference出现的错误是什么原因,以下是我的训练命令和inference命令 train : python main.py -mode=train --num_classer=53 --training_file_pattern=tfrecord/train-000* --model_name=efficientdet-d0 --model_dir=model --ckpt=efficientdet-d0 --train_batch_size=32 --eval_batch_size=8 --eval_samples=1024 --num_examples_per_epoch=1619 --num_epochs=2 --hparams="use_bfloat16=false,num_classes=53,moving_average_decay=0" --use_tpu=False inference: python model_inspect.py --runmode=infer --model_name=efficientdet-d0 --ckpt_path=./model --max_boxes_to_draw=100 --min_score_thresh=0.2 --input_image=../automl/efficientdet/car01.jpeg --output_image_dir=tmp/ --num_classes=53 --input_image_size=512 inference error: 2020-04-16 18:15:19.945517: W tensorflow/core/framework/op_kernel.cc:1622] OP_REQUIRES failed at save_restore_v2_ops.cc:184 : Not found: Key box_net/box-0-bn-3/beta/ExponentialMovingAverage not found in checkpoint Traceback (most recent call last): File "/home/vcaadmin/miniconda3/envs/GEDet/lib/python3.6/site-packages/tensorflow_core/python/client/session.py", line 1365, in _do_call return fn(*args) File "/home/vcaadmin/miniconda3/envs/GEDet/lib/python3.6/site-packages/tensorflow_core/python/client/session.py", line 1350, in _run_fn target_list, run_metadata) File "/home/vcaadmin/miniconda3/envs/GEDet/lib/python3.6/site-packages/tensorflow_core/python/client/session.py", line 1443, in _call_tf_sessionrun run_metadata) tensorflow.python.framework.errors_impl.NotFoundError: 2 root error(s) found. (0) Not found: Key box_net/box-0-bn-3/beta/ExponentialMovingAverage not found in checkpoint [[{{node save/RestoreV2}}]] (1) Not found: Key box_net/box-0-bn-3/beta/ExponentialMovingAverage not found in checkpoint [[{{node save/RestoreV2}}]] [[save/RestoreV2/_301]] 0 successful operations. 0 derived errors ignored.
并没有解决,你解决了吗?
https://github.com/google/automl/issues/348#issuecomment-623287987 This problem has been solved by the author