TorchLean API

NN.Runtime.Autograd.Engine.Cuda.Ops.Fourier

Native real-transform adjoints #

Packed complex coordinates use the ordinary real dot product. If w[k] is one at DC/Nyquist and two at interior frequencies, the adjoints are R* g = n * irfft(g / w) and I* g = (w / n) * rfft(g). Imaginary endpoint coordinates are zero in either adjoint. The transforms are linear, so their JVPs apply the same forward transform to the tangent.

Packed weights for a real-transform adjoint, repeated independently for each batch row.

Instances For

    Adjoint of the unnormalized real transform for arbitrary packed cotangents.

    The weights compensate for the conjugate pairs inserted by the normalized inverse. Both the temporary weights and weighted spectrum are released after the inverse has consumed them.

    Instances For

      Adjoint of the normalized inverse, including exact zero imaginary endpoint gradients.

      Instances For
        def Runtime.Autograd.Cuda.Tape.rfft1d {batch n : } (t : Tape) (xId : ) :

        Record a native packed real transform and its real-linear adjoint.

        Instances For
          def Runtime.Autograd.Cuda.Tape.irfft1d {batch n : } (t : Tape) (xId : ) :

          Record a normalized native inverse with its output length and packed-coordinate adjoint.

          Instances For