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

Python convert.py error #35

Closed
HieweiDu opened this issue Jul 9, 2019 · 1 comment
Closed

Python convert.py error #35

HieweiDu opened this issue Jul 9, 2019 · 1 comment

Comments

@HieweiDu
Copy link

HieweiDu commented Jul 9, 2019

I want to know the version of cudnn, I tried cudnn7.5.1, but he doesn't work.

~/yolov3-tf2$ python convert.py
/home/dhh/anaconda3/lib/python3.6/site-packages/h5py/init.py:36: FutureWarning: Conversion of the second argument of issubdtype from float to np.floating is deprecated. In future, it will be treated as np.float64 == np.dtype(float).type.
from ._conv import register_converters as _register_converters
2019-07-09 17:46:52.049771: 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-07-09 17:46:52.054104: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcuda.so.1
2019-07-09 17:46:52.116723: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1009] 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-07-09 17:46:52.117718: I tensorflow/compiler/xla/service/service.cc:162] XLA service 0x564ac0e64a40 executing computations on platform CUDA. Devices:
2019-07-09 17:46:52.117733: I tensorflow/compiler/xla/service/service.cc:169] StreamExecutor device (0): GeForce GTX 1050 Ti, Compute Capability 6.1
2019-07-09 17:46:52.119343: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 3600000000 Hz
2019-07-09 17:46:52.119700: I tensorflow/compiler/xla/service/service.cc:162] XLA service 0x564ac0ed0e50 executing computations on platform Host. Devices:
2019-07-09 17:46:52.119714: I tensorflow/compiler/xla/service/service.cc:169] StreamExecutor device (0): ,
2019-07-09 17:46:52.120057: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1467] Found device 0 with properties:
name: GeForce GTX 1050 Ti major: 6 minor: 1 memoryClockRate(GHz): 1.392
pciBusID: 0000:01:00.0
totalMemory: 3.94GiB freeMemory: 3.67GiB
2019-07-09 17:46:52.120088: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1546] Adding visible gpu devices: 0
2019-07-09 17:46:52.120143: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcudart.so.10.0
2019-07-09 17:46:52.121039: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1015] Device interconnect StreamExecutor with strength 1 edge matrix:
2019-07-09 17:46:52.121049: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1021] 0
2019-07-09 17:46:52.121069: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1034] 0: N
2019-07-09 17:46:52.121172: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1149] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 3462 MB memory) -> physical GPU (device: 0, name: GeForce GTX 1050 Ti, pci bus id: 0000:01:00.0, compute capability: 6.1)
Model: "yolov3"


Layer (type) Output Shape Param # Connected to

input_1 (InputLayer) [(None, None, None, 0


yolo_darknet (Model) ((None, None, None, 40620640 input_1[0][0]


yolo_conv_0 (Model) (None, None, None, 5 11024384 yolo_darknet[1][2]


yolo_conv_1 (Model) (None, None, None, 2 2957312 yolo_conv_0[1][0]
yolo_darknet[1][1]


yolo_conv_2 (Model) (None, None, None, 1 741376 yolo_conv_1[1][0]
yolo_darknet[1][0]


yolo_output_0 (Model) (None, None, None, 3 4984063 yolo_conv_0[1][0]


yolo_output_1 (Model) (None, None, None, 3 1312511 yolo_conv_1[1][0]


yolo_output_2 (Model) (None, None, None, 3 361471 yolo_conv_2[1][0]


yolo_boxes_0 (Lambda) ((None, None, None, 0 yolo_output_0[1][0]


yolo_boxes_1 (Lambda) ((None, None, None, 0 yolo_output_1[1][0]


yolo_boxes_2 (Lambda) ((None, None, None, 0 yolo_output_2[1][0]


yolo_nms (Lambda) ((None, 100, 4), (No 0 yolo_boxes_0[0][0]
yolo_boxes_0[0][1]
yolo_boxes_0[0][2]
yolo_boxes_1[0][0]
yolo_boxes_1[0][1]
yolo_boxes_1[0][2]
yolo_boxes_2[0][0]
yolo_boxes_2[0][1]
yolo_boxes_2[0][2]

Total params: 62,001,757
Trainable params: 61,949,149
Non-trainable params: 52,608


I0709 17:46:57.439600 139777120954112 convert.py:18] model created
I0709 17:46:57.441039 139777120954112 utils.py:45] yolo_darknet/conv2d bn
I0709 17:46:57.443896 139777120954112 utils.py:45] yolo_darknet/conv2d_1 bn
I0709 17:46:57.446532 139777120954112 utils.py:45] yolo_darknet/conv2d_2 bn
I0709 17:46:57.448883 139777120954112 utils.py:45] yolo_darknet/conv2d_3 bn
I0709 17:46:57.451326 139777120954112 utils.py:45] yolo_darknet/conv2d_4 bn
I0709 17:46:57.454463 139777120954112 utils.py:45] yolo_darknet/conv2d_5 bn
I0709 17:46:57.456880 139777120954112 utils.py:45] yolo_darknet/conv2d_6 bn
I0709 17:46:57.459455 139777120954112 utils.py:45] yolo_darknet/conv2d_7 bn
I0709 17:46:57.461632 139777120954112 utils.py:45] yolo_darknet/conv2d_8 bn
I0709 17:46:57.464024 139777120954112 utils.py:45] yolo_darknet/conv2d_9 bn
I0709 17:46:57.468281 139777120954112 utils.py:45] yolo_darknet/conv2d_10 bn
I0709 17:46:57.470547 139777120954112 utils.py:45] yolo_darknet/conv2d_11 bn
I0709 17:46:57.473851 139777120954112 utils.py:45] yolo_darknet/conv2d_12 bn
I0709 17:46:57.476211 139777120954112 utils.py:45] yolo_darknet/conv2d_13 bn
I0709 17:46:57.479484 139777120954112 utils.py:45] yolo_darknet/conv2d_14 bn
I0709 17:46:57.481873 139777120954112 utils.py:45] yolo_darknet/conv2d_15 bn
I0709 17:46:57.485709 139777120954112 utils.py:45] yolo_darknet/conv2d_16 bn
I0709 17:46:57.488569 139777120954112 utils.py:45] yolo_darknet/conv2d_17 bn
I0709 17:46:57.492237 139777120954112 utils.py:45] yolo_darknet/conv2d_18 bn
I0709 17:46:57.494879 139777120954112 utils.py:45] yolo_darknet/conv2d_19 bn
I0709 17:46:57.498184 139777120954112 utils.py:45] yolo_darknet/conv2d_20 bn
I0709 17:46:57.500384 139777120954112 utils.py:45] yolo_darknet/conv2d_21 bn
I0709 17:46:57.503392 139777120954112 utils.py:45] yolo_darknet/conv2d_22 bn
I0709 17:46:57.505593 139777120954112 utils.py:45] yolo_darknet/conv2d_23 bn
I0709 17:46:57.508599 139777120954112 utils.py:45] yolo_darknet/conv2d_24 bn
I0709 17:46:57.510802 139777120954112 utils.py:45] yolo_darknet/conv2d_25 bn
I0709 17:46:57.513751 139777120954112 utils.py:45] yolo_darknet/conv2d_26 bn
I0709 17:46:57.525273 139777120954112 utils.py:45] yolo_darknet/conv2d_27 bn
I0709 17:46:57.528098 139777120954112 utils.py:45] yolo_darknet/conv2d_28 bn
I0709 17:46:57.534902 139777120954112 utils.py:45] yolo_darknet/conv2d_29 bn
I0709 17:46:57.538571 139777120954112 utils.py:45] yolo_darknet/conv2d_30 bn
I0709 17:46:57.550390 139777120954112 utils.py:45] yolo_darknet/conv2d_31 bn
I0709 17:46:57.554516 139777120954112 utils.py:45] yolo_darknet/conv2d_32 bn
I0709 17:46:57.565870 139777120954112 utils.py:45] yolo_darknet/conv2d_33 bn
I0709 17:46:57.569745 139777120954112 utils.py:45] yolo_darknet/conv2d_34 bn
I0709 17:46:57.581679 139777120954112 utils.py:45] yolo_darknet/conv2d_35 bn
I0709 17:46:57.585679 139777120954112 utils.py:45] yolo_darknet/conv2d_36 bn
I0709 17:46:57.597076 139777120954112 utils.py:45] yolo_darknet/conv2d_37 bn
I0709 17:46:57.601133 139777120954112 utils.py:45] yolo_darknet/conv2d_38 bn
I0709 17:46:57.612637 139777120954112 utils.py:45] yolo_darknet/conv2d_39 bn
I0709 17:46:57.616534 139777120954112 utils.py:45] yolo_darknet/conv2d_40 bn
I0709 17:46:57.627830 139777120954112 utils.py:45] yolo_darknet/conv2d_41 bn
I0709 17:46:57.631635 139777120954112 utils.py:45] yolo_darknet/conv2d_42 bn
I0709 17:46:57.642864 139777120954112 utils.py:45] yolo_darknet/conv2d_43 bn
I0709 17:46:57.699196 139777120954112 utils.py:45] yolo_darknet/conv2d_44 bn
I0709 17:46:57.705252 139777120954112 utils.py:45] yolo_darknet/conv2d_45 bn
I0709 17:46:57.757189 139777120954112 utils.py:45] yolo_darknet/conv2d_46 bn
I0709 17:46:57.761758 139777120954112 utils.py:45] yolo_darknet/conv2d_47 bn
I0709 17:46:57.804775 139777120954112 utils.py:45] yolo_darknet/conv2d_48 bn
I0709 17:46:57.809182 139777120954112 utils.py:45] yolo_darknet/conv2d_49 bn
I0709 17:46:57.859200 139777120954112 utils.py:45] yolo_darknet/conv2d_50 bn
I0709 17:46:57.863812 139777120954112 utils.py:45] yolo_darknet/conv2d_51 bn
I0709 17:46:57.906277 139777120954112 utils.py:45] yolo_conv_0/conv2d_52 bn
I0709 17:46:57.909931 139777120954112 utils.py:45] yolo_conv_0/conv2d_53 bn
I0709 17:46:57.959341 139777120954112 utils.py:45] yolo_conv_0/conv2d_54 bn
I0709 17:46:57.963100 139777120954112 utils.py:45] yolo_conv_0/conv2d_55 bn
I0709 17:46:58.012643 139777120954112 utils.py:45] yolo_conv_0/conv2d_56 bn
I0709 17:46:58.016298 139777120954112 utils.py:45] yolo_output_0/conv2d_57 bn
I0709 17:46:58.065901 139777120954112 utils.py:45] yolo_output_0/conv2d_58 bias
I0709 17:46:58.067934 139777120954112 utils.py:45] yolo_conv_1/conv2d_59 bn
I0709 17:46:58.070146 139777120954112 utils.py:45] yolo_conv_1/conv2d_60 bn
I0709 17:46:58.072342 139777120954112 utils.py:45] yolo_conv_1/conv2d_61 bn
I0709 17:46:58.077865 139777120954112 utils.py:45] yolo_conv_1/conv2d_62 bn
I0709 17:46:58.080121 139777120954112 utils.py:45] yolo_conv_1/conv2d_63 bn
I0709 17:46:58.086580 139777120954112 utils.py:45] yolo_conv_1/conv2d_64 bn
I0709 17:46:58.088860 139777120954112 utils.py:45] yolo_output_1/conv2d_65 bn
I0709 17:46:58.094257 139777120954112 utils.py:45] yolo_output_1/conv2d_66 bias
I0709 17:46:58.095541 139777120954112 utils.py:45] yolo_conv_2/conv2d_67 bn
I0709 17:46:58.097150 139777120954112 utils.py:45] yolo_conv_2/conv2d_68 bn
I0709 17:46:58.098598 139777120954112 utils.py:45] yolo_conv_2/conv2d_69 bn
I0709 17:46:58.100960 139777120954112 utils.py:45] yolo_conv_2/conv2d_70 bn
I0709 17:46:58.102352 139777120954112 utils.py:45] yolo_conv_2/conv2d_71 bn
I0709 17:46:58.104810 139777120954112 utils.py:45] yolo_conv_2/conv2d_72 bn
I0709 17:46:58.106407 139777120954112 utils.py:45] yolo_output_2/conv2d_73 bn
I0709 17:46:58.108677 139777120954112 utils.py:45] yolo_output_2/conv2d_74 bias
I0709 17:46:58.109469 139777120954112 convert.py:21] weights loaded
2019-07-09 17:46:58.121147: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcudnn.so.7
2019-07-09 17:46:58.759909: E tensorflow/stream_executor/cuda/cuda_dnn.cc:328] Loaded runtime CuDNN library: 7.3.1 but source was compiled with: 7.4.2. CuDNN library major and minor version needs to match or have higher minor version in case of CuDNN 7.0 or later version. If using a binary install, upgrade your CuDNN library. If building from sources, make sure the library loaded at runtime is compatible with the version specified during compile configuration.
2019-07-09 17:46:58.761417: E tensorflow/stream_executor/cuda/cuda_dnn.cc:328] Loaded runtime CuDNN library: 7.3.1 but source was compiled with: 7.4.2. CuDNN library major and minor version needs to match or have higher minor version in case of CuDNN 7.0 or later version. If using a binary install, upgrade your CuDNN library. If building from sources, make sure the library loaded at runtime is compatible with the version specified during compile configuration.
Traceback (most recent call last):
File "convert.py", line 33, in
app.run(main)
File "/home/dhh/anaconda3/lib/python3.6/site-packages/absl/app.py", line 300, in run
_run_main(main, args)
File "/home/dhh/anaconda3/lib/python3.6/site-packages/absl/app.py", line 251, in _run_main
sys.exit(main(argv))
File "convert.py", line 24, in main
output = yolo(img)
File "/home/dhh/anaconda3/lib/python3.6/site-packages/tensorflow/python/keras/engine/base_layer.py", line 660, in call
outputs = self.call(inputs, *args, **kwargs)
File "/home/dhh/anaconda3/lib/python3.6/site-packages/tensorflow/python/keras/engine/network.py", line 870, in call
return self._run_internal_graph(inputs, training=training, mask=mask)
File "/home/dhh/anaconda3/lib/python3.6/site-packages/tensorflow/python/keras/engine/network.py", line 1011, in _run_internal_graph
output_tensors = layer(computed_tensors, **kwargs)
File "/home/dhh/anaconda3/lib/python3.6/site-packages/tensorflow/python/keras/engine/base_layer.py", line 660, in call
outputs = self.call(inputs, *args, **kwargs)
File "/home/dhh/anaconda3/lib/python3.6/site-packages/tensorflow/python/keras/engine/network.py", line 870, in call
return self._run_internal_graph(inputs, training=training, mask=mask)
File "/home/dhh/anaconda3/lib/python3.6/site-packages/tensorflow/python/keras/engine/network.py", line 1011, in _run_internal_graph
output_tensors = layer(computed_tensors, **kwargs)
File "/home/dhh/anaconda3/lib/python3.6/site-packages/tensorflow/python/keras/engine/base_layer.py", line 660, in call
outputs = self.call(inputs, *args, **kwargs)
File "/home/dhh/anaconda3/lib/python3.6/site-packages/tensorflow/python/keras/layers/convolutional.py", line 196, in call
outputs = self._convolution_op(inputs, self.kernel)
File "/home/dhh/anaconda3/lib/python3.6/site-packages/tensorflow/python/ops/nn_ops.py", line 1078, in call
return self.conv_op(inp, filter)
File "/home/dhh/anaconda3/lib/python3.6/site-packages/tensorflow/python/ops/nn_ops.py", line 634, in call
return self.call(inp, filter)
File "/home/dhh/anaconda3/lib/python3.6/site-packages/tensorflow/python/ops/nn_ops.py", line 233, in call
name=self.name)
File "/home/dhh/anaconda3/lib/python3.6/site-packages/tensorflow/python/ops/nn_ops.py", line 1951, in conv2d
name=name)
File "/home/dhh/anaconda3/lib/python3.6/site-packages/tensorflow/python/ops/gen_nn_ops.py", line 1031, in conv2d
data_format=data_format, dilations=dilations, name=name, ctx=_ctx)
File "/home/dhh/anaconda3/lib/python3.6/site-packages/tensorflow/python/ops/gen_nn_ops.py", line 1130, in conv2d_eager_fallback
ctx=_ctx, name=name)
File "/home/dhh/anaconda3/lib/python3.6/site-packages/tensorflow/python/eager/execute.py", line 66, in quick_execute
six.raise_from(core._status_to_exception(e.code, message), None)
File "", line 3, in raise_from
tensorflow.python.framework.errors_impl.UnknownError: Failed to get convolution algorithm. This is probably because cuDNN failed to initialize, so try looking to see if a warning log message was printed above. [Op:Conv2D]

@zzh8829
Copy link
Owner

zzh8829 commented Jul 9, 2019

Looks like you would need 7.4.2

Loaded runtime CuDNN library: 7.3.1 but source was compiled with: 7.4.2. CuDNN library major and minor version needs to match or have higher minor version in case of CuDNN 7.0 or later version. If using a binary install, upgrade your CuDNN library. If building from sources, make sure the library loaded at runtime is compatible with the version specified during compile configuration.

@zzh8829 zzh8829 closed this as completed Dec 21, 2019
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