Skip to content

Comment on Yagrad – 100 SLOC autograd engine with complex numbers and fixed DAGparent

Comments

Here complex numbers are used for an eloquent gradient calculation - you can express all sorts of operations through just the 3 functions: `exp`, `log` and `add` defined over complex plane. Simplifies the code!

The added benefit is that all the variables become complex. As long as your loss is real-valued you should be able to backprop through your net and update the parameters.

PyTorch docs mention that complex variables may be used "in audio and other fields": https://pytorch.org/docs/stable/notes/autograd.html#how-is-w...

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.