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

Error: ty.placeholder from optimize.py

Open DDDoriM1 opened this issue 4 years ago • 1 comments

In the optimize.py, line 32. The style_shape is correct, which is (1,128,128,3), which could be printed. style_image = tf.placeholder(tf.int64, shape=style_shape, name='style_image') The error information: descriptor '_values' for 'BaseContainer' objects doesn't apply to 'RepeatedCompositeFieldContainer' object

I'm so confused, plz help me!!!!

Detailed Recall:

File "G:\trans style\fast-style-transfer-master\style.py", line 169, in main()

File "G:\trans style\fast-style-transfer-master\style.py", line 149, in main for preds, losses, i, epoch in optimize(*args, **kwargs):

File "src\optimize.py", line 32, in optimize style_image = tf.placeholder(tf.int64, shape=style_shape, name='style_image')

File "E:\Anaconda\envs\qq\lib\site-packages\tensorflow\python\ops\array_ops.py", line 1808, in placeholder return gen_array_ops.placeholder(dtype=dtype, shape=shape, name=name)

File "E:\Anaconda\envs\qq\lib\site-packages\tensorflow\python\ops\gen_array_ops.py", line 4847, in placeholder "Placeholder", dtype=dtype, shape=shape, name=name)

File "E:\Anaconda\envs\qq\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 381, in _apply_op_helper for attr_def in op_def.attr:

File "E:\Anaconda\envs\qq\lib\site-packages\google\protobuf\internal\containers.py", line 208, in getitem return self._values[key]

DDDoriM1 avatar Mar 28 '20 01:03 DDDoriM1

This worked for me

!apt install ffmpeg
!pip install tensorflow==0.12.1
!pip install numpy==1.11.2
!pip install scipy==0.18.1
!pip install pillow==3.4.2

darkmarthur avatar Apr 10 '20 18:04 darkmarthur