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

在linux下复现代码 #6

Open
UUnforgettable opened this issue Jun 7, 2023 · 3 comments
Open

在linux下复现代码 #6

UUnforgettable opened this issue Jun 7, 2023 · 3 comments

Comments

@UUnforgettable
Copy link

作者你好,我正在尝试在linux下复现项目,但是项目中的[libtensorflow_compression.so]文件是MacOS的接口?运行后显示:tensorflow.python.framework.errors_impl.NotFoundError: /root/ADJSCC-main/tensorflow_compression/python/ops/../../cc/libtensorflow_compression.so: invalid ELF header
我无法在linux下使用。我尝试自己生成一个so文件,但一直失败。请问是否有什么办法可以让我能够在linux下运行呢?(https://github.com/alexxu1988/ADJSCC/blob/main/tensorflow_compression/cc/libtensorflow_compression.so)
下面是我运行时的报错信息:

root@d8bfc2d8bbf3:~/ADJSCC-main# /bin/python3.8 /root/ADJSCC-main/adjscc_cifar10.py
2023-06-07 09:30:12.700859: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
Traceback (most recent call last):
File "/root/ADJSCC-main/adjscc_cifar10.py", line 2, in
from util_module import Attention_Encoder, Attention_Decoder
File "/root/ADJSCC-main/util_module.py", line 1, in
import tensorflow_compression as tfc
File "/root/ADJSCC-main/tensorflow_compression/init.py", line 30, in
from tensorflow_compression.python.entropy_models.continuous_batched import *
File "/root/ADJSCC-main/tensorflow_compression/python/entropy_models/continuous_batched.py", line 20, in
from tensorflow_compression.python.entropy_models import continuous_base
File "/root/ADJSCC-main/tensorflow_compression/python/entropy_models/continuous_base.py", line 24, in
from tensorflow_compression.python.ops import range_coding_ops
File "/root/ADJSCC-main/tensorflow_compression/python/ops/range_coding_ops.py", line 26, in
ops = namespace_helper.get_ops(load_library.load_op_library(
File "/usr/local/lib/python3.8/dist-packages/tensorflow/python/framework/load_library.py", line 54, in load_op_library
lib_handle = py_tf.TF_LoadLibrary(library_filename)
tensorflow.python.framework.errors_impl.NotFoundError: /root/ADJSCC-main/tensorflow_compression/python/ops/../../cc/libtensorflow_compression.so: invalid ELF header

@JustLiu223
Copy link

请问解决了吗,我也遇到了同样的问题

@UUnforgettable
Copy link
Author

请问解决了吗,我也遇到了同样的问题

我有点忘记了。但是我应该是从tensorflow的compression那个仓库复制了对应的文件夹放在项目文件下,然后就跑通了。但是我后面是用的docker环境跑的

@JustLiu223
Copy link

JustLiu223 commented Nov 4, 2024 via email

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