best_local_affine_kernel.cu [WinError 126] 在 Windows 10 上找不到指定的模块
best_local_affine_kernel.cu [WinError 126] The specified module could not be found on Windows 10
我是 运行 Windows 10 上的 FastPhotoStyle 代码,使用 Python 3.7、CUDA 10.0 和 cuda 9.1。虽然我做了建议的更改,将 Python 的版本从字符串升级到字节,但我仍然遇到同样的错误。您能否提出解决此问题的建议。
Resize image: (803,538)->(803,538)
Resize image: (960,540)->(960,540)
Elapsed time in stylization: 2.325060
Elapsed time in propagation: 83.987388
Elapsed time in post processing: 0.015629
Traceback (most recent call last):
File "demo.py", line 47, in
no_post=args.no_post
File "D:\TrainImages\FastPhotoStyle-master\process_stylization.py", line 135, in stylization
out_img = smooth_filter(out_img, cont_pilimg, f_radius=15, f_edge=1e-1)
File "D:\TrainImages\FastPhotoStyle-master\smooth_filter.py", line 402, in smooth_filter
best_ = smooth_local_affine(output_, input_, 1e-7, 3, H, W, f_radius, f_edge)
File "D:\TrainImages\FastPhotoStyle-master\smooth_filter.py", line 333, in smooth_local_affine
program = Program(src.encode('utf-8'),best_local_affine_kernel.cu'.encode('utf-8'))
File "C:\Users\SD\Anaconda3\lib\site-packages\pynvrtc\compiler.py", line 49, in init
self._interface = NVRTCInterface(lib_name)
File "C:\Users\SD\Anaconda3\lib\site-packages\pynvrtc\interface.py", line 87, in init
self._load_nvrtc_lib(lib_path)
File "C:\Users\SD\Anaconda3\lib\site-packages\pynvrtc\interface.py", line 109, in _load_nvrtc_lib
self.lib = cdll.LoadLibrary(name)
File "C:\Users\SD\Anaconda3\lib\ctypes_init.py", line 434, in LoadLibrary
return self.dlltype(name)
File "C:\Users\SD\Anaconda3\lib\ctypes_init.py", line 356, in init
self._handle = _dlopen(self._name, mode)
OSError: [WinError 126] The specified module could not be found
我已经将字符串更改为字节
program = Program(src.encode('utf-8'), 'best_local_affine_kernel.cu'.encode('utf-8'))
ptx = program.compile(['-I/usr/local/cuda/include'.encode('utf-8')])
请在此处查看文档 --> https://github.com/NVIDIA/FastPhotoStyle/blob/master/TUTORIAL.md
上面的 link 指定了 Ubuntu 上的设置,但是 Python 模块也有一些先决条件,您应该已经在您的计算机上安装了这些模块。
我是 运行 Windows 10 上的 FastPhotoStyle 代码,使用 Python 3.7、CUDA 10.0 和 cuda 9.1。虽然我做了建议的更改,将 Python 的版本从字符串升级到字节,但我仍然遇到同样的错误。您能否提出解决此问题的建议。
Resize image: (803,538)->(803,538)
Resize image: (960,540)->(960,540)
Elapsed time in stylization: 2.325060
Elapsed time in propagation: 83.987388
Elapsed time in post processing: 0.015629
Traceback (most recent call last):
File "demo.py", line 47, in
no_post=args.no_post
File "D:\TrainImages\FastPhotoStyle-master\process_stylization.py", line 135, in stylization
out_img = smooth_filter(out_img, cont_pilimg, f_radius=15, f_edge=1e-1)
File "D:\TrainImages\FastPhotoStyle-master\smooth_filter.py", line 402, in smooth_filter
best_ = smooth_local_affine(output_, input_, 1e-7, 3, H, W, f_radius, f_edge)
File "D:\TrainImages\FastPhotoStyle-master\smooth_filter.py", line 333, in smooth_local_affine
program = Program(src.encode('utf-8'),best_local_affine_kernel.cu'.encode('utf-8'))
File "C:\Users\SD\Anaconda3\lib\site-packages\pynvrtc\compiler.py", line 49, in init
self._interface = NVRTCInterface(lib_name)
File "C:\Users\SD\Anaconda3\lib\site-packages\pynvrtc\interface.py", line 87, in init
self._load_nvrtc_lib(lib_path)
File "C:\Users\SD\Anaconda3\lib\site-packages\pynvrtc\interface.py", line 109, in _load_nvrtc_lib
self.lib = cdll.LoadLibrary(name)
File "C:\Users\SD\Anaconda3\lib\ctypes_init.py", line 434, in LoadLibrary
return self.dlltype(name)
File "C:\Users\SD\Anaconda3\lib\ctypes_init.py", line 356, in init
self._handle = _dlopen(self._name, mode)
OSError: [WinError 126] The specified module could not be found
我已经将字符串更改为字节
program = Program(src.encode('utf-8'), 'best_local_affine_kernel.cu'.encode('utf-8'))
ptx = program.compile(['-I/usr/local/cuda/include'.encode('utf-8')])
请在此处查看文档 --> https://github.com/NVIDIA/FastPhotoStyle/blob/master/TUTORIAL.md
上面的 link 指定了 Ubuntu 上的设置,但是 Python 模块也有一些先决条件,您应该已经在您的计算机上安装了这些模块。