Closed lunasdejavu closed 4 years ago
all the local variables when the error happened in maskrcnninceptionv2 :
cluster:None
cluster_data:None
configs:{'eval_config': num_examples: 8000
m...evals: 10
, 'eval_input_config': label_map_path: "C:...PNG_MASKS
, 'eval_input_configs': [label_map_path: "C:...NG_MASKS
], 'model': faster_rcnn {
numb...ht: 4.0
}
, 'train_config': batch_size: 1
data_a...etection"
, 'train_input_config': label_map_path: "C:...PNG_MASKS
}
create_input_dict_fn:functools.partial(<function main.
all the files for the training are in the link, can someone give me a hand?
Try deleting the checkpoint
file that resides in the path your have specified at train_dir=...
in your command
@emasoumi Legend!
Hi There, We are checking to see if you still need help on this, as this seems to be an old issue. Please update this issue with the latest information, code snippet to reproduce your issue and error you are seeing. If we don't hear from you in the next 7 days, this issue will be closed automatically. If you don't need help on this issue any more, please consider closing this.
System information
https://github.com/tensorflow/tensorflow/tree/master/tools/tf_env_collect.sh
You can obtain the TensorFlow version with
python -c "import tensorflow as tf; print(tf.GIT_VERSION, tf.VERSION)"
I created the TFrecords from here 1 class and 1010 png images and Mask R-CNN with Resnet-50 (v1), Atrous version model from here config from here I modified the path and the tfrecord name in config and the image type, when I used the command above, the errors showed up:
Exception has occurred: tensorflow.python.framework.errors_impl.NotFoundError 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 Conv/biases/Momentum not found in checkpoint [[node save/RestoreV2 (defined at C:\Users\willy_sung\AppData\Local\Continuum\anaconda3\envs\venv\lib\site-packages\object_detection-0.1-py3.6.egg\object_detection\legacy\trainer.py:377) = RestoreV2[dtypes=[DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, ..., DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_INT64], _device="/job:localhost/replica:0/task:0/device:CPU:0"](_arg_save/Const_0_0, save/RestoreV2/tensor_names, save/RestoreV2/shape_and_slices)]] Caused by op 'save/RestoreV2', defined at: File "c:\Users\willy_sung.vscode\extensions\ms-python.python-2018.12.1\pythonFiles\ptvsd_launcher.py", line 45, in main(ptvsdArgs) File "c:\Users\willy_sung.vscode\extensions\ms-python.python-2018.12.1\pythonFiles\lib\python\ptvsd__main.py", line 265, in main wait=args.wait) File "c:\Users\willy_sung.vscode\extensions\ms-python.python-2018.12.1\pythonFiles\lib\python\ptvsd__main__.py", line 258, in handle_args debug_main(addr, name, kind, *extra, kwargs) File "c:\Users\willy_sung.vscode\extensions\ms-python.python-2018.12.1\pythonFiles\lib\python\ptvsd_local.py", line 45, in debug_main run_file(address, name, extra, kwargs) File "c:\Users\willy_sung.vscode\extensions\ms-python.python-2018.12.1\pythonFiles\lib\python\ptvsd_local.py", line 79, in run_file run(argv, addr, kwargs) File "c:\Users\willy_sung.vscode\extensions\ms-python.python-2018.12.1\pythonFiles\lib\python\ptvsd_local.py", line 140, in _run _pydevd.main() File "c:\Users\willy_sung.vscode\extensions\ms-python.python-2018.12.1\pythonFiles\lib\python\ptvsd_vendored\pydevd\pydevd.py", line 1925, in main debugger.connect(host, port) File "c:\Users\willy_sung.vscode\extensions\ms-python.python-2018.12.1\pythonFiles\lib\python\ptvsd_vendored\pydevd\pydevd.py", line 1283, in run return self._exec(is_module, entry_point_fn, module_name, file, globals, locals) File "c:\Users\willy_sung.vscode\extensions\ms-python.python-2018.12.1\pythonFiles\lib\python\ptvsd_vendored\pydevd\pydevd.py", line 1290, in _exec pydev_imports.execfile(file, globals, locals) # execute the script File "c:\Users\willy_sung.vscode\extensions\ms-python.python-2018.12.1\pythonFiles\lib\python\ptvsd_vendored\pydevd_pydev_imps_pydev_execfile.py", line 25, in execfile exec(compile(contents+"\n", file, 'exec'), glob, loc) File "c:\models\research\object_detection\legacy\train.py", line 184, in tf.app.run() File "C:\Users\willy_sung\AppData\Local\Continuum\anaconda3\envs\venv\lib\site-packages\tensorflow\python\platform\app.py", line 125, in run _sys.exit(main(argv)) File "C:\Users\willy_sung\AppData\Local\Continuum\anaconda3\envs\venv\lib\site-packages\tensorflow\python\util\deprecation.py", line 306, in new_func return func( args, kwargs) File "c:\models\research\object_detection\legacy\train.py", line 180, in main graph_hook_fn=graph_rewriter_fn) File "C:\Users\willy_sung\AppData\Local\Continuum\anaconda3\envs\venv\lib\site-packages\object_detection-0.1-py3.6.egg\object_detection\legacy\trainer.py", line 377, in train keep_checkpoint_every_n_hours=keep_checkpoint_every_n_hours) File "C:\Users\willy_sung\AppData\Local\Continuum\anaconda3\envs\venv\lib\site-packages\tensorflow\python\training\saver.py", line 1102, in init self.build() File "C:\Users\willy_sung\AppData\Local\Continuum\anaconda3\envs\venv\lib\site-packages\tensorflow\python\training\saver.py", line 1114, in build self._build(self._filename, build_save=True, build_restore=True) File "C:\Users\willy_sung\AppData\Local\Continuum\anaconda3\envs\venv\lib\site-packages\tensorflow\python\training\saver.py", line 1151, in _build build_save=build_save, build_restore=build_restore) File "C:\Users\willy_sung\AppData\Local\Continuum\anaconda3\envs\venv\lib\site-packages\tensorflow\python\training\saver.py", line 795, in _build_internal restore_sequentially, reshape) File "C:\Users\willy_sung\AppData\Local\Continuum\anaconda3\envs\venv\lib\site-packages\tensorflow\python\training\saver.py", line 406, in _AddRestoreOps restore_sequentially) File "C:\Users\willy_sung\AppData\Local\Continuum\anaconda3\envs\venv\lib\site-packages\tensorflow\python\training\saver.py", line 862, in bulk_restore return io_ops.restore_v2(filename_tensor, names, slices, dtypes) File "C:\Users\willy_sung\AppData\Local\Continuum\anaconda3\envs\venv\lib\site-packages\tensorflow\python\ops\gen_io_ops.py", line 1550, in restore_v2 shape_and_slices=shape_and_slices, dtypes=dtypes, name=name) File "C:\Users\willy_sung\AppData\Local\Continuum\anaconda3\envs\venv\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 787, in _apply_op_helper op_def=op_def) File "C:\Users\willy_sung\AppData\Local\Continuum\anaconda3\envs\venv\lib\site-packages\tensorflow\python\util\deprecation.py", line 488, in new_func return func(*args, **kwargs) File "C:\Users\willy_sung\AppData\Local\Continuum\anaconda3\envs\venv\lib\site-packages\tensorflow\python\framework\ops.py", line 3274, in create_op op_def=op_def) File "C:\Users\willy_sung\AppData\Local\Continuum\anaconda3\envs\venv\lib\site-packages\tensorflow\python\framework\ops.py", line 1770, in init__ self._traceback = tf_stack.extract_stack() 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 Conv/biases/Momentum not found in checkpoint [[node save/RestoreV2 (defined at C:\Users\willy_sung\AppData\Local\Continuum\anaconda3\envs\venv\lib\site-packages\object_detection-0.1-py3.6.egg\object_detection\legacy\trainer.py:377) = RestoreV2[dtypes=[DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, ..., DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_INT64], _device="/job:localhost/replica:0/task:0/device:CPU:0"](_arg_save/Const_0_0, save/RestoreV2/tensor_names, save/RestoreV2/shape_and_slices)]]
the path of the data and model is in the image
It seems the model is not right to the config file, but there is the same error when I try the maskrcnninceptionv2 model too. can anyone help me how to solve this problem?