Open oeway opened 3 years ago
A quick note here, after changing the following lines, the code runs:
points = img_size * out[b, index: index + 2 * (num_segments + 1)].view(-1, 2).cpu()
index += 2 * (num_segments + 1)
stroke_width = out[b, index].cpu()
index += 1
# the following line need to be changed
num_control_points = torch.zeros(int(np.log2(num_segments)), dtype = torch.int32).cpu() + 2
path = pydiffvg.Path(num_control_points = num_control_points,
points = points,
stroke_width = stroke_width,
is_closed = False)
However, I don't know how exactly should we compute the num_control_points
from the num_segments
. @BachiLi Could you please give some hint here?
I had to also pin the version of torch-tools
to 0.0.35
, otherwise the training cannot be started.
Hi, I am trying the sketch GAN example, but failed to run it because of
RuntimeError: The total length of the shape boundaries in the scene is not a number. Length = -nan
.If I run the following code for example:
I got:
Any idea why?