SSD-Tensorflow icon indicating copy to clipboard operation
SSD-Tensorflow copied to clipboard

DataLossError: Unable to open table file ../checkpoints/ssd_300_vgg.ckpt: Failed precondition: ../checkpoints/ssd_300_vgg.ckpt: perhaps your file is in a different file format and you need to use a different restore operator?

Open CODEJY opened this issue 7 years ago • 10 comments

I clone the project, and run the ssd minimal example in docker, but it had error.As follows:

DataLossError: Unable to open table file ../checkpoints/ssd_300_vgg.ckpt: Failed precondition: ../checkpoints/ssd_300_vgg.ckpt: perhaps your file is in a different file format and you need to use a different restore operator? [[Node: save_13/RestoreV2_1 = RestoreV2[dtypes=[DT_FLOAT], _device="/job:localhost/replica:0/task:0/cpu:0"](_arg_save_13/Const_0_0, save_13/RestoreV2_1/tensor_names, save_13/RestoreV2_1/shape_and_slices)]]

Caused by op u'save_13/RestoreV2_1', defined at: File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main "main", fname, loader, pkg_name) File "/usr/lib/python2.7/runpy.py", line 72, in _run_code exec code in run_globals File "/usr/local/lib/python2.7/dist-packages/ipykernel_launcher.py", line 16, in app.launch_new_instance() File "/usr/local/lib/python2.7/dist-packages/traitlets/config/application.py", line 658, in launch_instance app.start() File "/usr/local/lib/python2.7/dist-packages/ipykernel/kernelapp.py", line 477, in start ioloop.IOLoop.instance().start() File "/usr/local/lib/python2.7/dist-packages/zmq/eventloop/ioloop.py", line 177, in start super(ZMQIOLoop, self).start() File "/usr/local/lib/python2.7/dist-packages/tornado/ioloop.py", line 888, in start handler_func(fd_obj, events) File "/usr/local/lib/python2.7/dist-packages/tornado/stack_context.py", line 277, in null_wrapper return fn(*args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/zmq/eventloop/zmqstream.py", line 440, in _handle_events self._handle_recv() File "/usr/local/lib/python2.7/dist-packages/zmq/eventloop/zmqstream.py", line 472, in _handle_recv self._run_callback(callback, msg) File "/usr/local/lib/python2.7/dist-packages/zmq/eventloop/zmqstream.py", line 414, in _run_callback callback(*args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/tornado/stack_context.py", line 277, in null_wrapper return fn(*args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/ipykernel/kernelbase.py", line 283, in dispatcher return self.dispatch_shell(stream, msg) File "/usr/local/lib/python2.7/dist-packages/ipykernel/kernelbase.py", line 235, in dispatch_shell handler(stream, idents, msg) File "/usr/local/lib/python2.7/dist-packages/ipykernel/kernelbase.py", line 399, in execute_request user_expressions, allow_stdin) File "/usr/local/lib/python2.7/dist-packages/ipykernel/ipkernel.py", line 196, in do_execute res = shell.run_cell(code, store_history=store_history, silent=silent) File "/usr/local/lib/python2.7/dist-packages/ipykernel/zmqshell.py", line 533, in run_cell return super(ZMQInteractiveShell, self).run_cell(*args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/IPython/core/interactiveshell.py", line 2718, in run_cell interactivity=interactivity, compiler=compiler, result=result) File "/usr/local/lib/python2.7/dist-packages/IPython/core/interactiveshell.py", line 2822, in run_ast_nodes if self.run_code(code, result): File "/usr/local/lib/python2.7/dist-packages/IPython/core/interactiveshell.py", line 2882, in run_code exec(code_obj, self.user_global_ns, self.user_ns) File "", line 20, in saver = tf.train.Saver() File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/saver.py", line 1140, in init self.build() File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/saver.py", line 1172, in build filename=self._filename) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/saver.py", line 688, in build restore_sequentially, reshape) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/saver.py", line 407, in _AddRestoreOps tensors = self.restore_op(filename_tensor, saveable, preferred_shard) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/saver.py", line 247, in restore_op [spec.tensor.dtype])[0]) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/gen_io_ops.py", line 663, in restore_v2 dtypes=dtypes, name=name) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/op_def_library.py", line 767, in apply_op op_def=op_def) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 2630, in create_op original_op=self._default_original_op, op_def=op_def) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 1204, in init self._traceback = self._graph._extract_stack() # pylint: disable=protected-access

DataLossError (see above for traceback): Unable to open table file ../checkpoints/ssd_300_vgg.ckpt: Failed precondition: ../checkpoints/ssd_300_vgg.ckpt: perhaps your file is in a different file format and you need to use a different restore operator? [[Node: save_13/RestoreV2_1 = RestoreV2[dtypes=[DT_FLOAT], _device="/job:localhost/replica:0/task:0/cpu:0"](_arg_save_13/Const_0_0, save_13/RestoreV2_1/tensor_names, save_13/RestoreV2_1/shape_and_slices)]]

CODEJY avatar Oct 18 '17 06:10 CODEJY

my code 2017-10-18 16 49 54 my folder 2017-10-18 16 51 12

CODEJY avatar Oct 18 '17 08:10 CODEJY

I had solved it.It doesn't need 'sad_300_vgg.ckpt' folder,move the two documents out of the folder.

CODEJY avatar Oct 18 '17 09:10 CODEJY

It works for me.

raymondchua avatar Oct 19 '17 07:10 raymondchua

Do you modify the flie name in the code after you move the two documents out of the @CODEJY CODEJY

xiguangmengqi avatar Oct 20 '17 07:10 xiguangmengqi

No,I didn't.And you should delete the 'sad_300_vgg.ckpt' folder.

CODEJY avatar Oct 23 '17 01:10 CODEJY

@CODEJY Thanks a lot. Was struggling to solve this problem for a long time. It helped.

anshu1106 avatar Apr 18 '18 10:04 anshu1106

Thank you!

persistLearning avatar May 23 '18 03:05 persistLearning

Bravo!!

Zzhanxin avatar Mar 12 '19 09:03 Zzhanxin

Thank you so much! It bothered me for a long time.

MuseumMage avatar Mar 25 '19 05:03 MuseumMage

Hello all, just follow the below video and export your own model with in a 10 seconds

https://youtu.be/w0Ebsbz7HYA

Rajamohanreddyai avatar May 12 '19 16:05 Rajamohanreddyai