我在 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')])