tensorlayer / adaptive-style-transfer

Arbitrary Style Transfer in Real-time with Adaptive Instance Normalization
https://github.com/tensorlayer/tensorlayer
115 stars 29 forks source link

TypeError while running test.py #5

Open Davide-sd opened 5 years ago

Davide-sd commented 5 years ago

I'm trying this implementation, but I'm having an error running the command python3 test.py. I never used tensorlayer, so I think I need help.

This is the traceback:

Traceback (most recent call last):
  File "test.py", line 48, in <module>
    dec_net = decoder.decode(target_features, prefix="decoder/")
  File "/home/davide/Documents/Development/AI/adaptive-style-transfer/models.py", line 39, in decode
    net = UpSampling2dLayer(net, [2, 2], method=1)
  File "/usr/local/lib/python3.6/dist-packages/tensorlayer/layers/convolution.py", line 509, in __init__
    size_h = size[0] * int(self.inputs.get_shape()[1])
TypeError: __int__ returned non-int (type NoneType)

I'm using tensorlayer 1.8.1 and tensorflow 1.12.

TianMingChen commented 5 years ago

I'm trying this implementation, but I'm having an error running the command python3 test.py. I never used tensorlayer, so I think I need help.

This is the traceback:

Traceback (most recent call last):
  File "test.py", line 48, in <module>
    dec_net = decoder.decode(target_features, prefix="decoder/")
  File "/home/davide/Documents/Development/AI/adaptive-style-transfer/models.py", line 39, in decode
    net = UpSampling2dLayer(net, [2, 2], method=1)
  File "/usr/local/lib/python3.6/dist-packages/tensorlayer/layers/convolution.py", line 509, in __init__
    size_h = size[0] * int(self.inputs.get_shape()[1])
TypeError: __int__ returned non-int (type NoneType)

I'm using tensorlayer 1.8.1 and tensorflow 1.12.

Do you have solve this problem?

zsdonghao commented 5 years ago

would you try tl 1.14 ?

TianMingChen commented 5 years ago

would you try tl 1.14 ?

it seems not have tensorlayer 1.14 Versions?

Davide-sd commented 5 years ago

Hello @TianMingChen ,

It's been a few months now... I did solve that problem but I'm not sure how. Probably I upgraded tensorlayer to a newer version. In my system I have installed version 1.11.1, and it worked as expected.

TianMingChen commented 5 years ago

Hello @TianMingChen ,

It's been a few months now... I did solve that problem but I'm not sure how. Probably I upgraded tensorlayer to a newer version. In my system I have installed version 1.11.1, and it worked as expected.

Ok,thanks a lot!