Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OutOfRangeError (see above for traceback): Read less bytes than requested #7

Open
qixuxiang opened this issue Mar 17, 2018 · 4 comments

Comments

@qixuxiang
Copy link

qixuxiang commented Mar 17, 2018

Thanks for your awesome code share!

Recently I do some research on 3d construction and find your great code in github,but when I run the demo,some error occur.just like #2,all the output is here:

OutOfRangeError (see above for traceback): Read less bytes than requested
	 [[Node: save/RestoreV2_53 = RestoreV2[dtypes=[DT_FLOAT], _device="/job:localhost/replica:0/task:0/device:CPU:0"](_arg_save/Const_0_0, save/RestoreV2_53/tensor_names, save/RestoreV2_53/shape_and_slices)]]

I can find sgan_model.ckpt.data-00000-of-00001 ,sgan_model.ckpt.meta and
sgan_model.ckpt.index in param folder,but the size of them is very small:

4.0K	sgan_model.ckpt.data-00000-of-00001
216K	sgan_model.ckpt.meta
4.0K	sgan_model.ckpt.index

I run the code in Ubuntu 14.04 with tensorflow 1.5.0 in Python3.4,I solve all the dependent libraries and grammar conflict between py2 and py3 ,but still fail to run the code.It is indeed double happiness for me to get your help,thanks a lot!

@qixuxiang
Copy link
Author

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "application.py", line 9, in <module>
    model = sgan.Model("params/sgan_model.ckpt")
  File "/home/gitplace/pix2vox/model/sgan.py", line 15, in __init__
    self.build_model(model_path)
  File "/home/gitplace/pix2vox/model/sgan.py", line 40, in build_model
    self.saver.restore(self.sess, model_path)
  File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/training/saver.py", line 1686, in restore
    {self.saver_def.filename_tensor_name: save_path})
  File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/client/session.py", line 895, in run
    run_metadata_ptr)
  File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/client/session.py", line 1128, in _run
    feed_dict_tensor, options, run_metadata)
  File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/client/session.py", line 1344, in _do_run
    options, run_metadata)
  File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/client/session.py", line 1363, in _do_call
    raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.OutOfRangeError: Read less bytes than requested
	 [[Node: save/RestoreV2_53 = RestoreV2[dtypes=[DT_FLOAT], _device="/job:localhost/replica:0/task:0/device:CPU:0"](_arg_save/Const_0_0, save/RestoreV2_53/tensor_names, save/RestoreV2_53/shape_and_slices)]]

Caused by op 'save/RestoreV2_53', defined at:
  File "application.py", line 9, in <module>
    model = sgan.Model("params/sgan_model.ckpt")
  File "/home/gitplace/pix2vox/model/sgan.py", line 15, in __init__
    self.build_model(model_path)
  File "/home/gitplace/pix2vox/model/sgan.py", line 39, in build_model
    self.saver = tf.train.Saver(vars_G + vars_E)
  File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/training/saver.py", line 1239, in __init__
    self.build()
  File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/training/saver.py", line 1248, in build
    self._build(self._filename, build_save=True, build_restore=True)
  File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/training/saver.py", line 1284, in _build
    build_save=build_save, build_restore=build_restore)
  File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/training/saver.py", line 765, in _build_internal
    restore_sequentially, reshape)
  File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/training/saver.py", line 428, in _AddRestoreOps
    tensors = self.restore_op(filename_tensor, saveable, preferred_shard)
  File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/training/saver.py", line 268, in restore_op
    [spec.tensor.dtype])[0])
  File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/ops/gen_io_ops.py", line 1031, in restore_v2
    shape_and_slices=shape_and_slices, dtypes=dtypes, name=name)
  File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/framework/op_def_library.py", line 787, in _apply_op_helper
    op_def=op_def)
  File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/framework/ops.py", line 3160, in create_op
    op_def=op_def)
  File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/framework/ops.py", line 1625, in __init__
    self._traceback = self._graph._extract_stack()  # pylint: disable=protected-access

OutOfRangeError (see above for traceback): Read less bytes than requested
	 [[Node: save/RestoreV2_53 = RestoreV2[dtypes=[DT_FLOAT], _device="/job:localhost/replica:0/task:0/device:CPU:0"](_arg_save/Const_0_0, save/RestoreV2_53/tensor_names, save/RestoreV2_53/shape_and_slices)]]

@maxorange
Copy link
Owner

It seems the file sgan_model.ckpt.data-00000-of-00001 is not downloaded completely. I used Git LSF to save the large file. After installing Git LSF, you can download the file by the following command.

$ git lfs clone [email protected]:maxorange/pix2vox.git

I'm sorry. I should modify README.md.

@bhushanbrb
Copy link

yes this error came when ckpt.data-00000-of-00001 is partially loaded or downloaded. OutOfRangeError (see above for traceback): Read less bytes than requested

@bqey-xrsy
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants