a312863063 / generators-with-stylegan2

Here is a series of face generators based on StyleGAN2

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

tensorflow-gpu 版本问题

DamnCrab opened this issue · comments

现在安装的cuda是10.2的,安装tensorflow-gpu==1.14.0之后运行报错
ImportError: Could not find 'cudart64_100.dll'. TensorFlow requires that this DLL be installed in a directory that is named in your %PATH% environment variable. Download and install CUDA 10.0 from this URL: https://developer.nvidia.com/cuda-90-download-archive
更换1.15.0后报错
FileNotFoundError: [Errno 2] No such file or directory: 'networks/generator_yellow-stylegan2-config-f.pkl'
更换2.1.0后报错
ModuleNotFoundError: No module named 'tensorflow.contrib'
大佬能不能对cuda和tensorflow高版本做个适配,秋梨膏

我使用的是docker镜像,在运行程序的时候,报出以下错误,
Loading networks from "networks/generator_baby-stylegan2-config-f.pkl"...
2020-07-21 10:35:33.079771: E tensorflow/stream_executor/cuda/cuda_driver.cc:318] failed call to cuInit: UNKNOWN ERROR (-1)
Setting up TensorFlow plugin "fused_bias_act.cu": Preprocessing... Failed!
Traceback (most recent call last):
File "main_child.py", line 58, in
main()
File "main_child.py", line 54, in main
generate_images(network_pkl, generate_num)
File "main_child.py", line 19, in generate_images
_G, _D, Gs = pretrained_networks.load_networks(network_pkl)
File "/home/XX/code/self/deep_bone/Code-GAN/generators-with-stylegan2/pretrained_networks.py", line 76, in load_networks
G, D, Gs = pickle.load(stream, encoding='latin1')

File "", line 68, in apply_bias_act
File "/home/XX/code/self/deep_bone/Code-GAN/generators-with-stylegan2/dnnlib/tflib/ops/fused_bias_act.py", line 68, in fused_bias_act
return impl_dict[impl](x=x, b=b, axis=axis, act=act, alpha=alpha, gain=gain)
File "/home/XX/code/self/deep_bone/Code-GAN/generators-with-stylegan2/dnnlib/tflib/ops/fused_bias_act.py", line 122, in _fused_bias_act_cuda
cuda_kernel = _get_plugin().fused_bias_act
File "/home/XX/code/self/deep_bone/Code-GAN/generators-with-stylegan2/dnnlib/tflib/ops/fused_bias_act.py", line 16, in _get_plugin
return custom_ops.get_plugin(os.path.splitext(file)[0] + '.cu')
File "/home/XX/code/self/deep_bone/Code-GAN/generators-with-stylegan2/dnnlib/tflib/custom_ops.py", line 130, in get_plugin
compile_opts += ' --gpu-architecture=%s' % _get_cuda_gpu_arch_string()
File "/home/XX/code/self/deep_bone/Code-GAN/generators-with-stylegan2/dnnlib/tflib/custom_ops.py", line 52, in _get_cuda_gpu_arch_string
raise RuntimeError('No GPU devices found')
RuntimeError: No GPU devices found

主要是没有GPU,我想问一下,这个的解决思路是什么样的?

我使用的是docker镜像,在运行程序的时候,报出以下错误,
Loading networks from "networks/generator_baby-stylegan2-config-f.pkl"...
2020-07-21 10:35:33.079771: E tensorflow/stream_executor/cuda/cuda_driver.cc:318] failed call to cuInit: UNKNOWN ERROR (-1)
Setting up TensorFlow plugin "fused_bias_act.cu": Preprocessing... Failed!
Traceback (most recent call last):
File "main_child.py", line 58, in
main()
File "main_child.py", line 54, in main
generate_images(network_pkl, generate_num)
File "main_child.py", line 19, in generate_images
_G, _D, Gs = pretrained_networks.load_networks(network_pkl)
File "/home/XX/code/self/deep_bone/Code-GAN/generators-with-stylegan2/pretrained_networks.py", line 76, in load_networks
G, D, Gs = pickle.load(stream, encoding='latin1')

File "", line 68, in apply_bias_act
File "/home/XX/code/self/deep_bone/Code-GAN/generators-with-stylegan2/dnnlib/tflib/ops/fused_bias_act.py", line 68, in fused_bias_act
return impl_dict[impl](x=x, b=b, axis=axis, act=act, alpha=alpha, gain=gain)
File "/home/XX/code/self/deep_bone/Code-GAN/generators-with-stylegan2/dnnlib/tflib/ops/fused_bias_act.py", line 122, in _fused_bias_act_cuda
cuda_kernel = _get_plugin().fused_bias_act
File "/home/XX/code/self/deep_bone/Code-GAN/generators-with-stylegan2/dnnlib/tflib/ops/fused_bias_act.py", line 16, in _get_plugin
return custom_ops.get_plugin(os.path.splitext(file)[0] + '.cu')
File "/home/XX/code/self/deep_bone/Code-GAN/generators-with-stylegan2/dnnlib/tflib/custom_ops.py", line 130, in get_plugin
compile_opts += ' --gpu-architecture=%s' % _get_cuda_gpu_arch_string()
File "/home/XX/code/self/deep_bone/Code-GAN/generators-with-stylegan2/dnnlib/tflib/custom_ops.py", line 52, in _get_cuda_gpu_arch_string
raise RuntimeError('No GPU devices found')
RuntimeError: No GPU devices found

主要是没有GPU,我想问一下,这个的解决思路是什么样的?

这个问题解决啦吗

现在安装的cuda是10.2的,安装tensorflow-gpu==1.14.0之后运行报错 ImportError: Could not find 'cudart64_100.dll'. TensorFlow requires that this DLL be installed in a directory that is named in your %PATH% environment variable. Download and install CUDA 10.0 from this URL: https://developer.nvidia.com/cuda-90-download-archive 更换1.15.0后报错 FileNotFoundError: [Errno 2] No such file or directory: 'networks/generator_yellow-stylegan2-config-f.pkl' 更换2.1.0后报错 ModuleNotFoundError: No module named 'tensorflow.contrib' 大佬能不能对cuda和tensorflow高版本做个适配,秋梨膏

此项目好像在https://github.com/NVlabs/stylegan2的基础上开发,syslegan2好像不升级了cuda,所以此项目也没升级。
https://github.com/NVlabs/stylegan3里的硬件要求,把stylegan2升级到stylegan3,应该可以做高片本适配。