neural-style-tf
neural-style-tf copied to clipboard
can't assign GPU
i had this erreur $ bash stylize_image.sh ./image_input/lion.jpg ./styles/kandinsky.jpg
Did you install the required dependencies? [y/n]
y
Do you have a CUDA enabled GPU? [y/n]
y Rendering stylized image. This may take a while...
---- RENDERING SINGLE IMAGE ----
2018-06-11 12:54:36.027672: I tensorflow/core/platform/cpu_feature_guard.cc:140] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA 2018-06-11 12:54:36.028359: E tensorflow/stream_executor/cuda/cuda_driver.cc:406] failed call to cuInit: CUDA_ERROR_UNKNOWN 2018-06-11 12:54:36.028384: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:158] retrieving CUDA diagnostic information for host: kais-X550JX 2018-06-11 12:54:36.028402: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:165] hostname: kais-X550JX 2018-06-11 12:54:36.028443: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:189] libcuda reported version is: 384.130.0 2018-06-11 12:54:36.028504: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:193] kernel reported version is: 384.130.0 2018-06-11 12:54:36.028513: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:300] kernel version seems to match DSO: 384.130.0
BUILDING VGG-19 NETWORK
loading model weights...
constructing layers...
LAYER GROUP 1
--conv1_1 | shape=(1, 512, 512, 64) | weights_shape=(3, 3, 3, 64)
--relu1_1 | shape=(1, 512, 512, 64) | bias_shape=(64,)
--conv1_2 | shape=(1, 512, 512, 64) | weights_shape=(3, 3, 64, 64)
--relu1_2 | shape=(1, 512, 512, 64) | bias_shape=(64,)
--pool1 | shape=(1, 256, 256, 64)
LAYER GROUP 2
--conv2_1 | shape=(1, 256, 256, 128) | weights_shape=(3, 3, 64, 128)
--relu2_1 | shape=(1, 256, 256, 128) | bias_shape=(128,)
--conv2_2 | shape=(1, 256, 256, 128) | weights_shape=(3, 3, 128, 128)
--relu2_2 | shape=(1, 256, 256, 128) | bias_shape=(128,)
--pool2 | shape=(1, 128, 128, 128)
LAYER GROUP 3
--conv3_1 | shape=(1, 128, 128, 256) | weights_shape=(3, 3, 128, 256)
--relu3_1 | shape=(1, 128, 128, 256) | bias_shape=(256,)
--conv3_2 | shape=(1, 128, 128, 256) | weights_shape=(3, 3, 256, 256)
--relu3_2 | shape=(1, 128, 128, 256) | bias_shape=(256,)
--conv3_3 | shape=(1, 128, 128, 256) | weights_shape=(3, 3, 256, 256)
--relu3_3 | shape=(1, 128, 128, 256) | bias_shape=(256,)
--conv3_4 | shape=(1, 128, 128, 256) | weights_shape=(3, 3, 256, 256)
--relu3_4 | shape=(1, 128, 128, 256) | bias_shape=(256,)
--pool3 | shape=(1, 64, 64, 256)
LAYER GROUP 4
--conv4_1 | shape=(1, 64, 64, 512) | weights_shape=(3, 3, 256, 512)
--relu4_1 | shape=(1, 64, 64, 512) | bias_shape=(512,)
--conv4_2 | shape=(1, 64, 64, 512) | weights_shape=(3, 3, 512, 512)
--relu4_2 | shape=(1, 64, 64, 512) | bias_shape=(512,)
--conv4_3 | shape=(1, 64, 64, 512) | weights_shape=(3, 3, 512, 512)
--relu4_3 | shape=(1, 64, 64, 512) | bias_shape=(512,)
--conv4_4 | shape=(1, 64, 64, 512) | weights_shape=(3, 3, 512, 512)
--relu4_4 | shape=(1, 64, 64, 512) | bias_shape=(512,)
--pool4 | shape=(1, 32, 32, 512)
LAYER GROUP 5
--conv5_1 | shape=(1, 32, 32, 512) | weights_shape=(3, 3, 512, 512)
--relu5_1 | shape=(1, 32, 32, 512) | bias_shape=(512,)
--conv5_2 | shape=(1, 32, 32, 512) | weights_shape=(3, 3, 512, 512)
--relu5_2 | shape=(1, 32, 32, 512) | bias_shape=(512,)
--conv5_3 | shape=(1, 32, 32, 512) | weights_shape=(3, 3, 512, 512)
--relu5_3 | shape=(1, 32, 32, 512) | bias_shape=(512,)
--conv5_4 | shape=(1, 32, 32, 512) | weights_shape=(3, 3, 512, 512)
--relu5_4 | shape=(1, 32, 32, 512) | bias_shape=(512,)
--pool5 | shape=(1, 16, 16, 512)
Traceback (most recent call last):
File "neural_style.py", line 856, in
Caused by op u'Variable', defined at:
File "neural_style.py", line 856, in
InvalidArgumentError (see above for traceback): Cannot assign a device for operation 'Variable': Operation was explicitly assigned to /device:GPU:0 but available devices are [ /job:localhost/replica:0/task:0/device:CPU:0 ]. Make sure the device specification refers to a valid device. [[Node: Variable = VariableV2container="", dtype=DT_FLOAT, shape=[1,512,512,3], shared_name="", _device="/device:GPU:0"]]
Try running pip install tensorflow-gpu
, it might help
@ivan-rivera : It didn't help.
@kaismax : Were you able to solve the issue?
conda install tensorflow-gpu==1.3.0
is what solved my problem. This tensor flow gpu version is compatible with Cuda tool kit 8