Я просто хочу использовать Deep Style Transfer на Tensorflow GPU, я не понимаю эту ошибку - PullRequest
0 голосов
/ 05 марта 2019

Хорошо, я пытаюсь выполнить глубокую передачу стиля из окон, чтобы я мог обработать последовательность изображений для создания видео.Мне успешно удалось заставить работать версию CPU this , следуя этому руководству Я потратил много дней на это сейчас, и я попробовал множество методов, чтобы заставить это работатьЯ создал предыдущий вопрос с кучей нерешенных проблем, и то, что я пробовал здесь

Я сейчас нахожусь ближе всего к тому, чтобы заставить его работать на GPU, и я понятия не имеюоб этой ошибке.

Сейчас я использую anaconda версии 2.7, но в виртуальной среде под управлением

python 3.5.6 я вручную установил

cuda 8 
cuDNN 5.1

однако я установил tenorflowна conda install tensorflow-gpu и запуск списка conda дает этот результат

    # packages in environment at C:\Users\kurti\Anaconda2\envs\tf1:
#
# Name                    Version                   Build  Channel
_tflow_select             2.1.0                       gpu
absl-py                   0.4.1                    py35_0
astor                     0.7.1                    py35_0
blas                      1.0                         mkl
certifi                   2018.8.24                py35_1
cudatoolkit               9.0                           1
cudnn                     7.3.1                 cuda9.0_0
gast                      0.2.0                    py35_0
grpcio                    1.12.1           py35h1a1b453_0
icc_rt                    2019.0.0             h0cc432a_1
intel-openmp              2019.1                      144
libprotobuf               3.6.0                h1a1b453_0
markdown                  2.6.11                   py35_0
mkl                       2018.0.3                      1
mkl_fft                   1.0.6            py35hdbbee80_0
mkl_random                1.0.1            py35h77b88f5_1
numpy                     1.15.2           py35ha559c80_0
numpy-base                1.15.2           py35h8128ebf_0
pip                       10.0.1                   py35_0
protobuf                  3.6.0            py35he025d50_0
python                    3.5.6                he025d50_0
setuptools                40.2.0                   py35_0
six                       1.11.0                   py35_1
tensorboard               1.10.0           py35he025d50_0
tensorflow                1.10.0          gpu_py35ha5d5ef7_0
tensorflow-base           1.10.0          gpu_py35h6e53903_0
tensorflow-gpu            1.10.0               hf154084_0
termcolor                 1.1.0                    py35_1
vc                        14.1                 h0510ff6_4
vs2015_runtime            14.15.26706          h3a45250_0
werkzeug                  0.14.1                   py35_0
wheel                     0.31.1                   py35_0
wincertstore              0.2              py35hfebbdb8_0
zlib                      1.2.11               h62dcd97_3

Это ошибка, которую я получаю при попытке запустить скрипт

    (tf1) C:\Users\kurti\GitProjects\DeepStyle>cd C:\Users\kurti\GitProjects\DeepStyle\Deep Style\neural-style-tf-master

(tf1) C:\Users\kurti\GitProjects\DeepStyle\Deep Style\neural-style-tf-master>neural_style.py --content_img littleme.jpg --style_imgs starry-night.jpg --max_iterations 100 --verbose
I c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\stream_executor\dso_loader.cc:128] successfully opened CUDA library cublas64_80.dll locally
I c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\stream_executor\dso_loader.cc:128] successfully opened CUDA library cudnn64_5.dll locally
I c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\stream_executor\dso_loader.cc:128] successfully opened CUDA library cufft64_80.dll locally
I c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\stream_executor\dso_loader.cc:128] successfully opened CUDA library nvcuda.dll locally
I c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\stream_executor\dso_loader.cc:128] successfully opened CUDA library curand64_80.dll locally

---- RENDERING SINGLE IMAGE ----

I c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\core\common_runtime\gpu\gpu_device.cc:885] Found device 0 with properties:
name: GeForce GTX 1080
major: 6 minor: 1 memoryClockRate (GHz) 1.835
pciBusID 0000:02:00.0
Total memory: 8.00GiB
Free memory: 6.61GiB
I c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\core\common_runtime\gpu\gpu_device.cc:906] DMA: 0
I c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\core\common_runtime\gpu\gpu_device.cc:916] 0:   Y
I c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\core\common_runtime\gpu\gpu_device.cc:975] Creating TensorFlow device (/gpu:0) -> (device: 0, name: GeForce GTX 1080, pci bus id: 0000:02:00.0)
E c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\core\common_runtime\gpu\gpu_device.cc:586] Could not identify NUMA node of /job:localhost/replica:0/task:0/gpu:0, defaulting to 0.  Your kernel may not have been built with NUMA support.

BUILDING VGG-19 NETWORK
loading model weights...
constructing layers...
LAYER GROUP 1
--conv1_1 | shape=(1, 512, 434, 64) | weights_shape=(3, 3, 3, 64)
--relu1_1 | shape=(1, 512, 434, 64) | bias_shape=(64,)
--conv1_2 | shape=(1, 512, 434, 64) | weights_shape=(3, 3, 64, 64)
--relu1_2 | shape=(1, 512, 434, 64) | bias_shape=(64,)
--pool1   | shape=(1, 256, 217, 64)
LAYER GROUP 2
--conv2_1 | shape=(1, 256, 217, 128) | weights_shape=(3, 3, 64, 128)
--relu2_1 | shape=(1, 256, 217, 128) | bias_shape=(128,)
--conv2_2 | shape=(1, 256, 217, 128) | weights_shape=(3, 3, 128, 128)
--relu2_2 | shape=(1, 256, 217, 128) | bias_shape=(128,)
--pool2   | shape=(1, 128, 109, 128)
LAYER GROUP 3
--conv3_1 | shape=(1, 128, 109, 256) | weights_shape=(3, 3, 128, 256)
--relu3_1 | shape=(1, 128, 109, 256) | bias_shape=(256,)
--conv3_2 | shape=(1, 128, 109, 256) | weights_shape=(3, 3, 256, 256)
--relu3_2 | shape=(1, 128, 109, 256) | bias_shape=(256,)
--conv3_3 | shape=(1, 128, 109, 256) | weights_shape=(3, 3, 256, 256)
--relu3_3 | shape=(1, 128, 109, 256) | bias_shape=(256,)
--conv3_4 | shape=(1, 128, 109, 256) | weights_shape=(3, 3, 256, 256)
--relu3_4 | shape=(1, 128, 109, 256) | bias_shape=(256,)
--pool3   | shape=(1, 64, 55, 256)
LAYER GROUP 4
--conv4_1 | shape=(1, 64, 55, 512) | weights_shape=(3, 3, 256, 512)
--relu4_1 | shape=(1, 64, 55, 512) | bias_shape=(512,)
--conv4_2 | shape=(1, 64, 55, 512) | weights_shape=(3, 3, 512, 512)
--relu4_2 | shape=(1, 64, 55, 512) | bias_shape=(512,)
--conv4_3 | shape=(1, 64, 55, 512) | weights_shape=(3, 3, 512, 512)
--relu4_3 | shape=(1, 64, 55, 512) | bias_shape=(512,)
--conv4_4 | shape=(1, 64, 55, 512) | weights_shape=(3, 3, 512, 512)
--relu4_4 | shape=(1, 64, 55, 512) | bias_shape=(512,)
--pool4   | shape=(1, 32, 28, 512)
LAYER GROUP 5
--conv5_1 | shape=(1, 32, 28, 512) | weights_shape=(3, 3, 512, 512)
--relu5_1 | shape=(1, 32, 28, 512) | bias_shape=(512,)
--conv5_2 | shape=(1, 32, 28, 512) | weights_shape=(3, 3, 512, 512)
--relu5_2 | shape=(1, 32, 28, 512) | bias_shape=(512,)
--conv5_3 | shape=(1, 32, 28, 512) | weights_shape=(3, 3, 512, 512)
--relu5_3 | shape=(1, 32, 28, 512) | bias_shape=(512,)
--conv5_4 | shape=(1, 32, 28, 512) | weights_shape=(3, 3, 512, 512)
--relu5_4 | shape=(1, 32, 28, 512) | bias_shape=(512,)
--pool5   | shape=(1, 16, 14, 512)
Traceback (most recent call last):
  File "C:\Users\kurti\GitProjects\DeepStyle\Deep Style\neural-style-tf-master\neural_style.py", line 858, in <module>
    main()
  File "C:\Users\kurti\GitProjects\DeepStyle\Deep Style\neural-style-tf-master\neural_style.py", line 855, in main
    else: render_single_image()
  File "C:\Users\kurti\GitProjects\DeepStyle\Deep Style\neural-style-tf-master\neural_style.py", line 824, in render_single_image
    stylize(content_img, style_imgs, init_img)
  File "C:\Users\kurti\GitProjects\DeepStyle\Deep Style\neural-style-tf-master\neural_style.py", line 564, in stylize
    L_tv = tf.image.total_variation(net['input'])
AttributeError: module 'tensorflow.python.ops.image_ops' has no attribute 'total_variation'

Для первоначальных руководств требуется 3 других зависимости, которые яустановили с помощью команды pip3 в активированной среде, но я не уверен, что Cuda использует их, и, возможно, это вызывает ошибку?и если да, то как мне сказать cuda установить эти .whl

, пожалуйста, помогите, я не знаю, что делать.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...