[HN Gopher] Yagrad - 100 SLOC autograd engine with complex numbe...
       ___________________________________________________________________
        
       Yagrad - 100 SLOC autograd engine with complex numbers and fixed
       DAG
        
       Author : noway421
       Score  : 25 points
       Date   : 2024-03-18 06:28 UTC (16 hours ago)
        
 (HTM) web link (github.com)
 (TXT) w3m dump (github.com)
        
       | spadufed wrote:
       | What are some common examples of complex numbers in these sorts
       | of applications?
        
         | noway421 wrote:
         | 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...
        
       | bionhoward wrote:
       | Elegant. I want to review this more. Could __slots__ work here? I
       | always compulsively try that to save memory. Keep it up.
        
       ___________________________________________________________________
       (page generated 2024-03-18 23:02 UTC)