Open quuhua911 opened 4 years ago
It may be the mismatch CUDA version 10.0
您好 我也遇到类似的问题 您的问题解决了吗 @quuhua911 @zhang0jhon
Traceback (most recent call last):
File "test.py", line 121, in
You may use the pb model in docker image but test.py in this repository. You should load the pb model with text_recognition.py in docker image. Model trained from this repository is slightly different from the competition model in docker image.
您好,我现在在docker里运行python text_recognition.py,但是仍然有报错信息,实在打扰您了 ,不知道该如何修改 @zhang0jhon
python flaskapp.py
当我运行这个也是类似的错误 好奇怪啊 @zhang0jhon
docker与nvidia-docker版本,还有运行docker的命令?
You may use the pb model in docker image but test.py in this repository. You should load the pb model with text_recognition.py in docker image. Model trained from this repository is slightly different from the competition model in docker image.
请问能提供这个仓库的训练模型权重吗
Same problem here when not using docker:
File "/home/retrohelix/.virtualenvs/AttentionOCR/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 3838, in _as_graph_element_locked "graph." % (repr(name), repr(op_name))) KeyError: "The name 'label:0' refers to a Tensor which does not exist. The operation, 'label', does not exist in the graph."
I tried using the models from the docker image:
ICDAR_0.5.pb ICDAR_0.7.pb text_recognition_5435.pb text_recognition.pb
CUDA Version is: Cuda compilation tools, release 10.0, V10.0.130 My python package versions are as follows (Python 3.6.9):
Package Version
absl-py 0.9.0
astor 0.8.1
cachetools 4.0.0
certifi 2019.11.28 chardet 3.0.4
cycler 0.10.0
Cython 0.29.14
gast 0.2.2
google-auth 1.10.0
google-auth-oauthlib 0.4.1
google-pasta 0.1.8
grpcio 1.26.0
h5py 2.10.0
idna 2.8
Keras-Applications 1.0.8
Keras-Preprocessing 1.1.0
kiwisolver 1.1.0
Markdown 3.1.1
matplotlib 3.1.2
msgpack 0.6.2
msgpack-numpy 0.4.4.3
numpy 1.18.0
oauthlib 3.1.0
opencv-python 4.1.2.30
opt-einsum 3.1.0
pip 19.3.1
protobuf 3.11.2
psutil 5.6.7
pyasn1 0.4.8
pyasn1-modules 0.2.7
pycocotools 2.0.0
pyparsing 2.4.6
python-dateutil 2.8.1
pyzmq 18.1.1
requests 2.22.0
requests-oauthlib 1.3.0
rsa 4.0
setuptools 42.0.2
six 1.13.0
tabulate 0.8.6
tensorboard 1.14.0
tensorflow 1.14.0
tensorflow-estimator 1.14.0
tensorflow-gpu 1.14.0
tensorpack 0.9.8
termcolor 1.1.0
tqdm 4.41.0
urllib3 1.25.7
Werkzeug 0.16.0
wheel 0.33.6
wrapt 1.11.2
Whats wrong with this setup? How can I use this without docker?
EDIT: Looks like I just need the right pb file.. So can you provide the model file for this repo?
python test.py 2019-11-13 16:33:41.908568: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcuda.so.1 2019-11-13 16:33:41.950705: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1005] 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-11-13 16:33:41.951266: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1640] Found device 0 with properties: name: GeForce GTX 1080 Ti major: 6 minor: 1 memoryClockRate(GHz): 1.62 pciBusID: 0000:01:00.0 2019-11-13 16:33:41.951360: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Could not dlopen library 'libcudart.so.10.0'; dlerror: libcudart.so.10.0: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/local/cuda-9.0/lib64 2019-11-13 16:33:41.951422: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Could not dlopen library 'libcublas.so.10.0'; dlerror: libcublas.so.10.0: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/local/cuda-9.0/lib64 2019-11-13 16:33:41.951477: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Could not dlopen library 'libcufft.so.10.0'; dlerror: libcufft.so.10.0: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/local/cuda-9.0/lib64 2019-11-13 16:33:41.951534: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Could not dlopen library 'libcurand.so.10.0'; dlerror: libcurand.so.10.0: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/local/cuda-9.0/lib64 2019-11-13 16:33:41.951589: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Could not dlopen library 'libcusolver.so.10.0'; dlerror: libcusolver.so.10.0: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/local/cuda-9.0/lib64 2019-11-13 16:33:41.951644: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Could not dlopen library 'libcusparse.so.10.0'; dlerror: libcusparse.so.10.0: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/local/cuda-9.0/lib64 2019-11-13 16:33:42.539829: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcudnn.so.7 2019-11-13 16:33:42.539906: W tensorflow/core/common_runtime/gpu/gpu_device.cc:1663] Cannot dlopen some GPU libraries. Skipping registering GPU devices... 2019-11-13 16:33:42.540637: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA 2019-11-13 16:33:42.575270: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 3192000000 Hz 2019-11-13 16:33:42.576026: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x557c16973a10 executing computations on platform Host. Devices: 2019-11-13 16:33:42.576040: I tensorflow/compiler/xla/service/service.cc:175] StreamExecutor device (0):,
2019-11-13 16:33:42.576103: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1181] Device interconnect StreamExecutor with strength 1 edge matrix:
2019-11-13 16:33:42.576110: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1187]
test(args)
File "test.py", line 91, in test
model = TextRecognition(args.pb_path, cfg.seq_len+1)
File "test.py", line 23, in init
self.init_model()
File "test.py", line 37, in init_model
self.label_ph = self.sess.graph.get_tensor_by_name('label:0')
File "/home/quh/.conda/envs/pytorch/lib/python3.7/site-packages/tensorflow/python/framework/ops.py", line 3972, in get_tensor_by_name
return self.as_graph_element(name, allow_tensor=True, allow_operation=False)
File "/home/quh/.conda/envs/pytorch/lib/python3.7/site-packages/tensorflow/python/framework/ops.py", line 3796, in as_graph_element
return self._as_graph_element_locked(obj, allow_tensor, allow_operation)
File "/home/quh/.conda/envs/pytorch/lib/python3.7/site-packages/tensorflow/python/framework/ops.py", line 3838, in _as_graph_element_locked
"graph." % (repr(name), repr(op_name)))
KeyError: "The name 'label:0' refers to a Tensor which does not exist. The operation, 'label', does not exist in the graph."
2019-11-13 16:33:42.656045: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1005] 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-11-13 16:33:42.656412: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x557c18c65640 executing computations on platform CUDA. Devices: 2019-11-13 16:33:42.656424: I tensorflow/compiler/xla/service/service.cc:175] StreamExecutor device (0): GeForce GTX 1080 Ti, Compute Capability 6.1 Traceback (most recent call last): File "test.py", line 121, in