LouieYang / deep-photo-styletransfer-tf

Tensorflow (Python API) implementation of Deep Photo Style Transfer
805 stars 186 forks source link

TypeError: 'NoneType' object is not subscriptable #18

Open t0mst0ne opened 6 years ago

t0mst0ne commented 6 years ago

[ environment: ] Ubuntu 17.10 1080Ti cuda 9.1 cudnn-9.1(libcudnn.so.7) Conda: cudnn: 7.0.5-cuda8.0_0
keras-gpu: 2.1.3-py36_0
tensorflow-gpu: 1.4.1-0
tensorflow-gpu-base: 1.4.1-py36h01caf0a_0

when I execute the sample code :

python deep_photostyle.py --content_image_path ./examples/input/in11.png --style_image_path ./examples/style/tar11.png --content_seg_path ./examples/segmentation/in11.png --style_seg_path ./examples/segmentation/tar11.png --style_option 2

/anaconda3/lib/python3.6/site-packages/h5py/init.py:36: FutureWarning: Conversion of the second argument of issubdtype from float to np.floating is deprecated. In future, it will be treated as np.float64 == np.dtype(float).type. from ._conv import register_converters as _register_converters 2018-02-25 15:09:34.839241: I tensorflow/core/platform/cpu_feature_guard.cc:137] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX AVX2 FMA 2018-02-25 15:09:35.468143: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:892] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero 2018-02-25 15:09:35.468599: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1030] Found device 0 with properties: name: GeForce GTX 1080 Ti major: 6 minor: 1 memoryClockRate(GHz): 1.683 pciBusID: 0000:01:00.0 totalMemory: 10.92GiB freeMemory: 10.76GiB 2018-02-25 15:09:35.468626: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1120] Creating TensorFlow device (/device:GPU:0) -> (device: 0, name: GeForce GTX 1080 Ti, pci bus id: 0000:01:00.0, compute capability: 6.1) Setting up style layer: <conv1_1/Relu:0> Setting up style layer: <conv2_1/Relu:0> Setting up style layer: <conv3_1/Relu:0> Setting up style layer: <conv4_1/Relu:0> Setting up style layer: <conv5_1/Relu:0> Iteration 0 / 2000 Content loss: nan Style 1 loss: nan Style 2 loss: nan Style 3 loss: nan Style 4 loss: nan Style 5 loss: nan TV loss: 2.216766915807966e-05 Affine loss: 9.999999747378752e-06 Total loss: nan Traceback (most recent call last): File "deep_photostyle.py", line 115, in main() File "deep_photostyle.py", line 90, in main result = Image.fromarray(np.uint8(np.clip(tmp_image_bgr[:, :, ::-1], 0, 255.0))) TypeError: 'NoneType' object is not subscriptable

Question : is it the problem of new Cuda 9.1 or lack of PyCUDA package ? thanks

LouieYang commented 6 years ago

I prefer it the problem of CUDA 9.1.