Can you provide a real example command for MODEL_WEIGHTS_PATH please ?
See original GitHub issuei have downloaded the crnn_synth90k.zip
And i tried this:
python ./tools/test_shadownet.py --image_path ./data/test_images/test_01.jpg --weights_path ./model/crnn_synth90k/checkpoint --char_dict_path ./data/char_dict/char_dict_en.json --ord_map_dict_path ./data/char_dict/ord_map_en.json
And i got this :
2019-10-21 06:20:26.476474: W tensorflow/core/framework/op_kernel.cc:1651] OP_REQUIRES failed at save_restore_tensor.cc:175 : Data loss: Unable to open table file ./model/crnn_synth90k/checkpoint: Data loss: file is too short to be an sstable: perhaps your file is in a different file format and you need to use a different restore operator?
Traceback (most recent call last):
File "/home/darker/.conda/envs/tests/lib/python3.7/site-packages/tensorflow_core/python/client/session.py", line 1365, in _do_call
return fn(*args)
File "/home/darker/.conda/envs/tests/lib/python3.7/site-packages/tensorflow_core/python/client/session.py", line 1350, in _run_fn
target_list, run_metadata)
File "/home/darker/.conda/envs/tests/lib/python3.7/site-packages/tensorflow_core/python/client/session.py", line 1443, in _call_tf_sessionrun
run_metadata)
tensorflow.python.framework.errors_impl.DataLossError: Unable to open table file ./model/crnn_synth90k/checkpoint: Data loss: file is too short to be an sstable: perhaps your file is in a different file format and you need to use a different restore operator?
[[{{node save/RestoreV2}}]]
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "./tools/test_shadownet.py", line 166, in <module>
is_vis=args.visualize
File "./tools/test_shadownet.py", line 131, in recognize
saver.restore(sess=sess, save_path=weights_path)
File "/home/darker/.conda/envs/tests/lib/python3.7/site-packages/tensorflow_core/python/training/saver.py", line 1290, in restore
{self.saver_def.filename_tensor_name: save_path})
File "/home/darker/.conda/envs/tests/lib/python3.7/site-packages/tensorflow_core/python/client/session.py", line 956, in run
run_metadata_ptr)
File "/home/darker/.conda/envs/tests/lib/python3.7/site-packages/tensorflow_core/python/client/session.py", line 1180, in _run
feed_dict_tensor, options, run_metadata)
File "/home/darker/.conda/envs/tests/lib/python3.7/site-packages/tensorflow_core/python/client/session.py", line 1359, in _do_run
run_metadata)
File "/home/darker/.conda/envs/tests/lib/python3.7/site-packages/tensorflow_core/python/client/session.py", line 1384, in _do_call
raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.DataLossError: Unable to open table file ./model/crnn_synth90k/checkpoint: Data loss: file is too short to be an sstable: perhaps your file is in a different file format and you need to use a different restore operator?
[[node save/RestoreV2 (defined at /home/darker/.conda/envs/tests/lib/python3.7/site-packages/tensorflow_core/python/framework/ops.py:1748) ]]
Original stack trace for 'save/RestoreV2':
File "./tools/test_shadownet.py", line 166, in <module>
is_vis=args.visualize
File "./tools/test_shadownet.py", line 120, in recognize
saver = tf.train.Saver()
File "/home/darker/.conda/envs/tests/lib/python3.7/site-packages/tensorflow_core/python/training/saver.py", line 828, in __init__
self.build()
File "/home/darker/.conda/envs/tests/lib/python3.7/site-packages/tensorflow_core/python/training/saver.py", line 840, in build
self._build(self._filename, build_save=True, build_restore=True)
File "/home/darker/.conda/envs/tests/lib/python3.7/site-packages/tensorflow_core/python/training/saver.py", line 878, in _build
build_restore=build_restore)
File "/home/darker/.conda/envs/tests/lib/python3.7/site-packages/tensorflow_core/python/training/saver.py", line 508, in _build_internal
restore_sequentially, reshape)
File "/home/darker/.conda/envs/tests/lib/python3.7/site-packages/tensorflow_core/python/training/saver.py", line 328, in _AddRestoreOps
restore_sequentially)
File "/home/darker/.conda/envs/tests/lib/python3.7/site-packages/tensorflow_core/python/training/saver.py", line 575, in bulk_restore
return io_ops.restore_v2(filename_tensor, names, slices, dtypes)
File "/home/darker/.conda/envs/tests/lib/python3.7/site-packages/tensorflow_core/python/ops/gen_io_ops.py", line 1696, in restore_v2
name=name)
File "/home/darker/.conda/envs/tests/lib/python3.7/site-packages/tensorflow_core/python/framework/op_def_library.py", line 794, in _apply_op_helper
op_def=op_def)
File "/home/darker/.conda/envs/tests/lib/python3.7/site-packages/tensorflow_core/python/util/deprecation.py", line 507, in new_func
return func(*args, **kwargs)
File "/home/darker/.conda/envs/tests/lib/python3.7/site-packages/tensorflow_core/python/framework/ops.py", line 3357, in create_op
attrs, op_def, compute_device)
File "/home/darker/.conda/envs/tests/lib/python3.7/site-packages/tensorflow_core/python/framework/ops.py", line 3426, in _create_op_internal
op_def=op_def)
File "/home/darker/.conda/envs/tests/lib/python3.7/site-packages/tensorflow_core/python/framework/ops.py", line 1748, in __init__
self._traceback = tf_stack.extract_stack()
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Roundtrip: density estimation with deep generative ... - GitHub
This repository provides source code and instructions for using Roundtrip on both simulation data and real data. Table of Contents. Requirements; Install ...
Read more >D2Go - Use Detectron2 on mobile devices - Gilbert Tanner
D2Go provides both built-in command-line tools and an API. This README will walk you through how you can use both the CLI and...
Read more >imaginAIry - PyPI
Generate images either in code or from command line. It just works. Proper requirements are installed. model weights are automatically downloaded. No ...
Read more >Comprehensive Guide to Zero-Shot and K-Shot Learning
Discover the different approaches to Zero-Shot / K-Shot learning: One-Shot Object Detection, Decoupled Faster R-CNN, Few-Shot Object ...
Read more >Vitis AI Optimizer User Guide - Xilinx
Vitis AI optimizer provides the ability to optimize neural network ... Once the command ana has ended, you can start pruning the model....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
AAHHH, it’s OK, now, thanks, so the complete command is :
That’s what i was asking 😄 Thank’s for sharing this project !
@Sanix-Darker Check this https://stackoverflow.com/questions/33759623/tensorflow-how-to-save-restore-a-model