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

UnimplementedError (see above for traceback): Only bilinear interpolation is currently supported. The input data shape must be [batch_size, data_height, data_width, data_channels] #5

Open
mobiiin opened this issue Aug 31, 2021 · 1 comment

Comments

@mobiiin
Copy link

mobiiin commented Aug 31, 2021

I get the following error when I run the feature_extraction node:

2021-08-31 16:40:08.903497: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
[INFO] [1630411812.601658]: /cam1/image_raw: no message received
Exception in thread Thread-6:
Traceback (most recent call last):
  File "/home/mobiiin/.local/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1334, in _do_call
    return fn(*args)
  File "/home/mobiiin/.local/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1319, in _run_fn
    options, feed_dict, fetch_list, target_list, run_metadata)
  File "/home/mobiiin/.local/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1407, in _call_tf_sessionrun
    run_metadata)
tensorflow.python.framework.errors_impl.UnimplementedError: Only bilinear interpolation is currently supported. The input data shape must be [batch_size, data_height, data_width, data_channels], but is: [1,460,256]
	 [[{{node resampler/Resampler}} = Resampler[T=DT_FLOAT, _device="/job:localhost/replica:0/task:0/device:CPU:0"](pred/descriptor_sampling/l2_normalize, mul)]]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.6/threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "/home/mobiiin/catkin_ws/src/deep_features/feature_extraction/feature_extraction_node.py", line 94, in worker
    self.process(msg, topic)
  File "/home/mobiiin/catkin_ws/src/deep_features/feature_extraction/feature_extraction_node.py", line 158, in process
    features = self.net.infer(image_gray)
  File "/home/mobiiin/git/deep_features/feature_extraction/hfnet_tf.py", line 107, in infer
    feed_dict = {self.net_image_in: image_in})
  File "/home/mobiiin/.local/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 929, in run
    run_metadata_ptr)
  File "/home/mobiiin/.local/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1152, in _run
    feed_dict_tensor, options, run_metadata)
  File "/home/mobiiin/.local/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1328, in _do_run
    run_metadata)
  File "/home/mobiiin/.local/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1348, in _do_call
    raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.UnimplementedError: Only bilinear interpolation is currently supported. The input data shape must be [batch_size, data_height, data_width, data_channels], but is: [1,460,256]
	 [[node resampler/Resampler (defined at /home/mobiiin/.local/lib/python3.6/site-packages/tensorflow/contrib/resampler/ops/gen_resampler_ops.py:43)  = Resampler[T=DT_FLOAT, _device="/job:localhost/replica:0/task:0/device:CPU:0"](pred/descriptor_sampling/l2_normalize, mul)]]

Caused by op 'resampler/Resampler', defined at:
  File "/home/mobiiin/catkin_ws/src/deep_features/feature_extraction/feature_extraction_node.py", line 200, in <module>
    main()
  File "/home/mobiiin/catkin_ws/src/deep_features/feature_extraction/feature_extraction_node.py", line 42, in main
    net = FeatureNet()
  File "/home/mobiiin/git/deep_features/feature_extraction/hfnet_tf.py", line 46, in __init__
    self.scaling_op[::-1] * tf.to_float(self.keypoints)[None]),
  File "/home/mobiiin/.local/lib/python3.6/site-packages/tensorflow/contrib/resampler/python/ops/resampler_ops.py", line 59, in resampler
    return gen_resampler_ops.resampler(data_tensor, warp_tensor)
  File "/home/mobiiin/.local/lib/python3.6/site-packages/tensorflow/contrib/resampler/ops/gen_resampler_ops.py", line 43, in resampler
    "Resampler", data=data, warp=warp, name=name)
  File "/home/mobiiin/.local/lib/python3.6/site-packages/tensorflow/python/framework/op_def_library.py", line 787, in _apply_op_helper
    op_def=op_def)
  File "/home/mobiiin/.local/lib/python3.6/site-packages/tensorflow/python/util/deprecation.py", line 488, in new_func
    return func(*args, **kwargs)
  File "/home/mobiiin/.local/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 3274, in create_op
    op_def=op_def)
  File "/home/mobiiin/.local/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 1770, in __init__
    self._traceback = tf_stack.extract_stack()

UnimplementedError (see above for traceback): Only bilinear interpolation is currently supported. The input data shape must be [batch_size, data_height, data_width, data_channels], but is: [1,460,256]
	 [[node resampler/Resampler (defined at /home/mobiiin/.local/lib/python3.6/site-packages/tensorflow/contrib/resampler/ops/gen_resampler_ops.py:43)  = Resampler[T=DT_FLOAT, _device="/job:localhost/replica:0/task:0/device:CPU:0"](pred/descriptor_sampling/l2_normalize, mul)]]
@wangy-w
Copy link

wangy-w commented May 17, 2023

Hello, I have also encountered the same problem. Have you resolved it!

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

2 participants