neural-style-tf
neural-style-tf copied to clipboard
AttributeError: 'module' object has no attribute 'computation'
Input -
python neural_style.py --content_img golden_gate.jpg --style_imgs starry-night.jpg --max_size 1280 --max_iterations 100 --device /gpu:0 --verbose
Output- (Click to reveal)
---- RENDERING SINGLE IMAGE ----2017-06-28 16:05:00.908797: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations. 2017-06-28 16:05:00.908831: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations. 2017-06-28 16:05:00.908845: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations. 2017-06-28 16:05:00.908857: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX2 instructions, but these are available on your machine and could speed up CPU computations. 2017-06-28 16:05:00.908868: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use FMA instructions, but these are available on your machine and could speed up CPU computations. 2017-06-28 16:05:01.152459: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:893] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero 2017-06-28 16:05:01.153529: I tensorflow/core/common_runtime/gpu/gpu_device.cc:940] Found device 0 with properties: name: GeForce GTX 1080 Ti major: 6 minor: 1 memoryClockRate (GHz) 1.6705 pciBusID 0000:23:00.0 Total memory: 10.91GiB Free memory: 10.17GiB 2017-06-28 16:05:01.153564: I tensorflow/core/common_runtime/gpu/gpu_device.cc:961] DMA: 0 2017-06-28 16:05:01.153575: I tensorflow/core/common_runtime/gpu/gpu_device.cc:971] 0: Y 2017-06-28 16:05:01.153601: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1030] Creating TensorFlow device (/gpu:0) -> (device: 0, name: GeForce GTX 1080 Ti, pci bus id: 0000:23:00.0)
BUILDING VGG-19 NETWORK
loading model weights...
constructing layers...
LAYER GROUP 1
--conv1_1 | shape=(1, 734, 979, 64) | weights_shape=(3, 3, 3, 64)
--relu1_1 | shape=(1, 734, 979, 64) | bias_shape=(64,)
--conv1_2 | shape=(1, 734, 979, 64) | weights_shape=(3, 3, 64, 64)
--relu1_2 | shape=(1, 734, 979, 64) | bias_shape=(64,)
--pool1 | shape=(1, 367, 490, 64)
LAYER GROUP 2
--conv2_1 | shape=(1, 367, 490, 128) | weights_shape=(3, 3, 64, 128)
--relu2_1 | shape=(1, 367, 490, 128) | bias_shape=(128,)
--conv2_2 | shape=(1, 367, 490, 128) | weights_shape=(3, 3, 128, 128)
--relu2_2 | shape=(1, 367, 490, 128) | bias_shape=(128,)
--pool2 | shape=(1, 184, 245, 128)
LAYER GROUP 3
--conv3_1 | shape=(1, 184, 245, 256) | weights_shape=(3, 3, 128, 256)
--relu3_1 | shape=(1, 184, 245, 256) | bias_shape=(256,)
--conv3_2 | shape=(1, 184, 245, 256) | weights_shape=(3, 3, 256, 256)
--relu3_2 | shape=(1, 184, 245, 256) | bias_shape=(256,)
--conv3_3 | shape=(1, 184, 245, 256) | weights_shape=(3, 3, 256, 256)
--relu3_3 | shape=(1, 184, 245, 256) | bias_shape=(256,)
--conv3_4 | shape=(1, 184, 245, 256) | weights_shape=(3, 3, 256, 256)
--relu3_4 | shape=(1, 184, 245, 256) | bias_shape=(256,)
--pool3 | shape=(1, 92, 123, 256)
LAYER GROUP 4
--conv4_1 | shape=(1, 92, 123, 512) | weights_shape=(3, 3, 256, 512)
--relu4_1 | shape=(1, 92, 123, 512) | bias_shape=(512,)
--conv4_2 | shape=(1, 92, 123, 512) | weights_shape=(3, 3, 512, 512)
--relu4_2 | shape=(1, 92, 123, 512) | bias_shape=(512,)
--conv4_3 | shape=(1, 92, 123, 512) | weights_shape=(3, 3, 512, 512)
--relu4_3 | shape=(1, 92, 123, 512) | bias_shape=(512,)
--conv4_4 | shape=(1, 92, 123, 512) | weights_shape=(3, 3, 512, 512)
--relu4_4 | shape=(1, 92, 123, 512) | bias_shape=(512,)
--pool4 | shape=(1, 46, 62, 512)
LAYER GROUP 5
--conv5_1 | shape=(1, 46, 62, 512) | weights_shape=(3, 3, 512, 512)
--relu5_1 | shape=(1, 46, 62, 512) | bias_shape=(512,)
--conv5_2 | shape=(1, 46, 62, 512) | weights_shape=(3, 3, 512, 512)
--relu5_2 | shape=(1, 46, 62, 512) | bias_shape=(512,)
--conv5_3 | shape=(1, 46, 62, 512) | weights_shape=(3, 3, 512, 512)
--relu5_3 | shape=(1, 46, 62, 512) | bias_shape=(512,)
--conv5_4 | shape=(1, 46, 62, 512) | weights_shape=(3, 3, 512, 512)
--relu5_4 | shape=(1, 46, 62, 512) | bias_shape=(512,)
--pool5 | shape=(1, 23, 31, 512)
Traceback (most recent call last):
File "neural_style.py", line 872, in
AttributeError: 'module' object has no attribute 'computation'
Whats going on? It seems to of found my gpu, i have all the requirements installed, other implemations of neural style have been working, i tried setting the device to /cpu:0 and im getting the same error Note i am using the latest version of tensorflow-gpu Also tried leaving out the --device argument, same error
Can you try the Adam optimizer and let me know if the same error happens?
@cysmith It works using the adam optimizer Im not sure why lbfg throws that error, Can anyone else replicate this error? i can use it successfully in other implemations, gpu memory shouldnt be the problem theres 11gb to use
Edit: Just kept an eye on gpu mem it goes up to 10gb right before it crashes so for some reason it is using an abnormally large amount of gpu probably memory more than 11gb Adjusted the --max_size to 640 and tried with 320 aswell Still gpu mem goes past 10gb
Using the latest cuda, cudnn, tensorflow 1.2.0, all that Is anyone else getting this with lbfgs?
@cysmith It seems even the adam optimizer is using around 10gb! :scream: But works O_o
I also got similar error : AttributeError: module 'pandas.core.computation' has no attribute 'expressions'. Adding the traceback :
Traceback (most recent call last):
File "neural_style.py", line 858, in