RuntimeError: Can't call numpy() on Tensor that requires grad. Use tensor.detach().numpy() instead.
kopyl opened this issue · comments
When i run this:
img_list = []
for i in range(150):
optimizer.zero_grad()
p_pred = svg_pred.sample_points()
l = svg_emd_loss(p_pred, p_target)
l.backward()
optimizer.step()
if i % 4 == 0:
img = svg_pred.draw(wiath_points=True, do_display=False, return_png=True)
img_list.append(img)
to_gif(img_list)