adaptive-style-transfer icon indicating copy to clipboard operation
adaptive-style-transfer copied to clipboard

TypeError while running test.py

Open Davide-sd opened this issue 6 years ago • 5 comments

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.

Davide-sd avatar Jan 16 '19 18:01 Davide-sd

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?

TianMingChen avatar May 26 '19 02:05 TianMingChen

would you try tl 1.14 ?

zsdonghao avatar May 26 '19 12:05 zsdonghao

would you try tl 1.14 ?

it seems not have tensorlayer 1.14 Versions?

TianMingChen avatar May 27 '19 01:05 TianMingChen

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.

Davide-sd avatar May 27 '19 10:05 Davide-sd

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!

TianMingChen avatar May 27 '19 11:05 TianMingChen