turicreate icon indicating copy to clipboard operation
turicreate copied to clipboard

style transfer with batch_size>1 exception

Open Vozf opened this issue 4 years ago • 4 comments

I try to use style transfer and set batch_size to 2. This results in error model = tc.style_transfer.create(styles, content, batch_size=2)

+--------------+--------------+--------------+
| Iteration    | Loss         | Elapsed Time |
+--------------+--------------+--------------+
Traceback (most recent call last):
  File "/home/a_yaroshevich/projects/pixomatic/pixomatic_dl/.venv/lib/python3.8/site-packages/turicreate/extensions.py", line 290, in __run_class_function
    ret = self._tkclass.call_function(fnname, argument_dict)
  File "cy_model.pyx", line 35, in turicreate._cython.cy_model.UnityModel.call_function
  File "cy_model.pyx", line 40, in turicreate._cython.cy_model.UnityModel.call_function
RuntimeError: An error occurred: ValueError: Cannot feed value of shape (2,) for Tensor 'Placeholder_2:0', which has shape '(1,)'

Vozf avatar Jan 14 '21 10:01 Vozf

It works fine with bs=1

Vozf avatar Jan 14 '21 10:01 Vozf

This works fine for me on macOS 10.15 using the style transfer data from our user guide.

@Vozf - can you reproduce this issue using that dataset? What operating system are you using?

TobyRoseman avatar Jan 14 '21 22:01 TobyRoseman

Ubuntu 20

Vozf avatar Jan 15 '21 06:01 Vozf

I have this issue as well. My OS info Screen Shot 2021-01-23 at 11 36 05 PM

eric573 avatar Jan 24 '21 07:01 eric573