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 #6

Open
ghost opened this issue Dec 18, 2019 · 1 comment

Comments

@ghost
Copy link

ghost commented Dec 18, 2019

Hi I am trying to infer with the pre-trained model you provided. I am using one of the .PLY files from ScanNet dataset. But it just gives the same error;

The command I use to infer:

python main.py --mode predict --config sessions/session_0/config.json --colors datasets/scannet/metadata/colors.txt --input datasets/scene0000_00_vh_clean_2.labels.ply

The error logs are:

Loaded configuration from: sessions/session_0/config.json
Size: 8.424978, 8.743941, 3.025378, # Points: 81369
Model Receptive Field Size: 9.000000, 9.000000, 3.600000
2019-12-18 15:59:51.956596: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2019-12-18 15:59:52.045512: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:998] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2019-12-18 15:59:52.046023: I tensorflow/compiler/xla/service/service.cc:150] XLA service 0x563cab617650 executing computations on platform CUDA. Devices:
2019-12-18 15:59:52.046042: I tensorflow/compiler/xla/service/service.cc:158]   StreamExecutor device (0): GeForce GTX 1060 with Max-Q Design, Compute Capability 6.1
2019-12-18 15:59:52.065024: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2808000000 Hz
2019-12-18 15:59:52.066188: I tensorflow/compiler/xla/service/service.cc:150] XLA service 0x563cab67fdb0 executing computations on platform Host. Devices:
2019-12-18 15:59:52.066248: I tensorflow/compiler/xla/service/service.cc:158]   StreamExecutor device (0): <undefined>, <undefined>
2019-12-18 15:59:52.067183: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1433] Found device 0 with properties: 
name: GeForce GTX 1060 with Max-Q Design major: 6 minor: 1 memoryClockRate(GHz): 1.3415
pciBusID: 0000:01:00.0
totalMemory: 5.94GiB freeMemory: 5.24GiB
2019-12-18 15:59:52.067247: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1512] Adding visible gpu devices: 0
2019-12-18 15:59:52.069467: I tensorflow/core/common_runtime/gpu/gpu_device.cc:984] Device interconnect StreamExecutor with strength 1 edge matrix:
2019-12-18 15:59:52.069515: I tensorflow/core/common_runtime/gpu/gpu_device.cc:990]      0 
2019-12-18 15:59:52.069535: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1003] 0:   N 
2019-12-18 15:59:52.070138: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1115] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 5067 MB memory) -> physical GPU (device: 0, name: GeForce GTX 1060 with Max-Q Design, pci bus id: 0000:01:00.0, compute capability: 6.1)

WARNING: The TensorFlow contrib module will not be included in TensorFlow 2.0.
For more information, please see:
  * https://github.com/tensorflow/community/blob/master/rfcs/20180907-contrib-sunset.md
  * https://github.com/tensorflow/addons
If you depend on functionality not listed there, please file an issue.

WARNING:tensorflow:From /home/x23/miniconda3/envs/pcs2/lib/python2.7/site-packages/tensorflow/python/framework/op_def_library.py:263: colocate_with (from tensorflow.python.framework.ops) is deprecated and will be removed in a future version.
Instructions for updating:
Colocations handled automatically by placer.
WARNING:tensorflow:From util/util.py:960: calling dropout (from tensorflow.python.ops.nn_ops) with keep_prob is deprecated and will be removed in a future version.
Instructions for updating:
Please use `rate` instead of `keep_prob`. Rate should be set to `rate = 1 - keep_prob`.
WARNING:tensorflow:From /home/x23/miniconda3/envs/pcs2/lib/python2.7/site-packages/tensorflow/python/training/saver.py:1266: checkpoint_exists (from tensorflow.python.training.checkpoint_management) is deprecated and will be removed in a future version.
Instructions for updating:
Use standard file APIs to check for files with this prefix.
2019-12-18 15:59:54.401315: W tensorflow/core/framework/op_kernel.cc:1401] OP_REQUIRES failed at save_restore_v2_ops.cc:184 : Out of range: Read less bytes than requested
Traceback (most recent call last):
  File "main.py", line 31, in <module>
    main()
  File "main.py", line 24, in main
    inference.predict(cla.config, cla.input, cla.device, cla.colors)
  File "/home/x23/workspace_3D_pc/fully-convolutional-point-network/inference.py", line 186, in predict
    sess, placeholders, pred_op, pointnet_locations, constant_features = setup_model(model, receptive_field_size, points.shape[0], config['model']['pointnet']['spacing'], config['dataset']['num_learnable_classes'], checkpoint_path, device)
  File "/home/x23/workspace_3D_pc/fully-convolutional-point-network/inference.py", line 87, in setup_model
    tf.train.Saver().restore(sess, checkpoint_path)
  File "/home/x23/miniconda3/envs/pcs2/lib/python2.7/site-packages/tensorflow/python/training/saver.py", line 1276, in restore
    {self.saver_def.filename_tensor_name: save_path})
  File "/home/x23/miniconda3/envs/pcs2/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 929, in run
    run_metadata_ptr)
  File "/home/x23/miniconda3/envs/pcs2/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1152, in _run
    feed_dict_tensor, options, run_metadata)
  File "/home/x23/miniconda3/envs/pcs2/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1328, in _do_run
    run_metadata)
  File "/home/x23/miniconda3/envs/pcs2/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1348, in _do_call
    raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.OutOfRangeError: Read less bytes than requested
	 [[node save/RestoreV2 (defined at /home/x23/workspace_3D_pc/fully-convolutional-point-network/inference.py:87) ]]
	 [[node save/RestoreV2 (defined at /home/x23/workspace_3D_pc/fully-convolutional-point-network/inference.py:87) ]]

Caused by op u'save/RestoreV2', defined at:
  File "main.py", line 31, in <module>
    main()
  File "main.py", line 24, in main
    inference.predict(cla.config, cla.input, cla.device, cla.colors)
  File "/home/x23/workspace_3D_pc/fully-convolutional-point-network/inference.py", line 186, in predict
    sess, placeholders, pred_op, pointnet_locations, constant_features = setup_model(model, receptive_field_size, points.shape[0], config['model']['pointnet']['spacing'], config['dataset']['num_learnable_classes'], checkpoint_path, device)
  File "/home/x23/workspace_3D_pc/fully-convolutional-point-network/inference.py", line 87, in setup_model
    tf.train.Saver().restore(sess, checkpoint_path)
  File "/home/x23/miniconda3/envs/pcs2/lib/python2.7/site-packages/tensorflow/python/training/saver.py", line 832, in __init__
    self.build()
  File "/home/x23/miniconda3/envs/pcs2/lib/python2.7/site-packages/tensorflow/python/training/saver.py", line 844, in build
    self._build(self._filename, build_save=True, build_restore=True)
  File "/home/x23/miniconda3/envs/pcs2/lib/python2.7/site-packages/tensorflow/python/training/saver.py", line 881, in _build
    build_save=build_save, build_restore=build_restore)
  File "/home/x23/miniconda3/envs/pcs2/lib/python2.7/site-packages/tensorflow/python/training/saver.py", line 513, in _build_internal
    restore_sequentially, reshape)
  File "/home/x23/miniconda3/envs/pcs2/lib/python2.7/site-packages/tensorflow/python/training/saver.py", line 332, in _AddRestoreOps
    restore_sequentially)
  File "/home/x23/miniconda3/envs/pcs2/lib/python2.7/site-packages/tensorflow/python/training/saver.py", line 580, in bulk_restore
    return io_ops.restore_v2(filename_tensor, names, slices, dtypes)
  File "/home/x23/miniconda3/envs/pcs2/lib/python2.7/site-packages/tensorflow/python/ops/gen_io_ops.py", line 1572, in restore_v2
    name=name)
  File "/home/x23/miniconda3/envs/pcs2/lib/python2.7/site-packages/tensorflow/python/framework/op_def_library.py", line 788, in _apply_op_helper
    op_def=op_def)
  File "/home/x23/miniconda3/envs/pcs2/lib/python2.7/site-packages/tensorflow/python/util/deprecation.py", line 507, in new_func
    return func(*args, **kwargs)
  File "/home/x23/miniconda3/envs/pcs2/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 3300, in create_op
    op_def=op_def)
  File "/home/x23/miniconda3/envs/pcs2/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 1801, in __init__
    self._traceback = tf_stack.extract_stack()

OutOfRangeError (see above for traceback): Read less bytes than requested
	 [[node save/RestoreV2 (defined at /home/x23/workspace_3D_pc/fully-convolutional-point-network/inference.py:87) ]]
	 [[node save/RestoreV2 (defined at /home/x23/workspace_3D_pc/fully-convolutional-point-network/inference.py:87) ]]
@shymaz
Copy link

shymaz commented Dec 19, 2019

I even tried with increasing the RAM size to 32 (previously it was 16). I looked at other sources, this problem might arise because of corrupted checkpoint file. Is it possible?

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

1 participant