14 Commits

Author SHA1 Message Date
Akko
e157af78bf erge branch 'master' of http://git.nakadashi.lol/akko/diffvg 2023-05-15 16:23:02 +02:00
Akko
d6388cf912 many changes 2023-05-15 16:22:28 +02:00
Dan Nissenbaum
a5e26c4395 Resolve crash in 'backward' when a background image with only 3 channels is passed to 'forward'
The existing code adds the fourth channel to the background image directly inside 'forward'. However, this breaks back propagation because Torch's autograd framework records the shapes of all inputs to the 'forward' function and expects shapes passed to 'backward' to match. By adding a channel to the background image inside 'forward' and passing this to 'backward', there is an extra channel that autograd does not expect, and it crashes.

The resolution is to instead raise an exception with a useful error message for the end user that they need to add a channel of all ones to the background image.
2023-04-24 12:38:35 +02:00
Oren Katzir
0d69c2b05e Convert arc points to torch.float 2023-04-24 12:38:35 +02:00
Jun Zhou
50b9353019 update of gradient mesh 2023-04-23 18:14:31 +02:00
Tzu-Mao Li
adb04d04ee Merge pull request #49 from daniel347x/background_image
Resolve crash in 'backward' when a background image with only 3 channels is passed to 'forward'
2023-01-09 12:17:05 -05:00
Oren Katzir
81bb7dde8c Convert arc points to torch.float 2023-01-09 09:25:35 +02:00
Dan Nissenbaum
af48db06cd Resolve crash in 'backward' when a background image with only 3 channels is passed to 'forward'
The existing code adds the fourth channel to the background image directly inside 'forward'. However, this breaks back propagation because Torch's autograd framework records the shapes of all inputs to the 'forward' function and expects shapes passed to 'backward' to match. By adding a channel to the background image inside 'forward' and passing this to 'backward', there is an extra channel that autograd does not expect, and it crashes.

The resolution is to instead raise an exception with a useful error message for the end user that they need to add a channel of all ones to the background image.
2022-11-05 15:07:47 -04:00
Robin Sloan
dac80fea96 found one more missing str conversion 2021-10-17 10:38:40 -07:00
Robin Sloan
1f7ed4987e fixing same error in Rect serializaiton 2021-10-02 12:23:21 -07:00
Robin Sloan
42670b3a25 fixing SVG circle serialization bug 2021-10-02 11:58:50 -07:00
vrroom
b4639e5222 Added matplotlib.colors to parse named colors
The svg parser will incorrectly parse colors such
as 'green' and 'red' to black. This commit fixes
that by using the code already written in matplotlib.colors
module
2021-05-13 16:12:12 +05:30
oeway
5b65ad38b1 Fix missing background_image argument 2020-09-28 21:51:26 +02:00
Tzu-Mao Li
413a3e5cee initial commit 2020-09-03 22:30:30 -04:00