class_docstr: RDFT reparameterization of a convolution kernel.
  
  This uses the real-input discrete Fourier transform (RDFT) of a kernel as
  its parameterization. The inverse RDFT is applied to the variable to produce
  the kernel.
  
  (see https://en.wikipedia.org/wiki/Discrete_Fourier_transform)
  
  Attributes:
    shape: `tf.TensorShape`. The shape of the convolution kernel.
    real: `tf.Variable`. The real part of the RDFT of the kernel.
    imag: `tf.Variable`. The imaginary part of the RDFT of the kernel.
docstr: Computes and returns the convolution kernel as a `tf.Tensor`.
docstr_tok: ["Computes","and","returns","the","convolution","kernel","as","a","`","tf.Tensor","`","."]
code: def __call__(self, compute_dtype=None) -> tf.Tensor:
      """Computes and returns the convolution kernel as a `tf.Tensor`."""
      real, imag = self.real, self.imag
      if compute_dtype in (tf.bfloat16, tf.float16):
          # As of 2022-02, there is no half precision complex math in TensorFlow.
          # So, we need to use at least 32 bits.
          real = tf.cast(real, tf.float32)
          imag = tf.cast(imag, tf.float32)
      elif compute_dtype is not None:
          real = tf.cast(real, compute_dtype)
          imag = tf.cast(imag, compute_dtype)
      rdft = tf.dtypes.complex(real, imag)
      norm = tf.constant(
          self.shape[:-2].num_elements() ** 0.5, rdft.dtype
      )
      rdft *= norm
      if self.shape.rank == 3:
          kernel = tf.signal.irfft(rdft, fft_length=self.shape[:-2])
          kernel = tf.transpose(kernel, (2, 0, 1))
      elif self.shape.rank == 4:
          kernel = tf.signal.irfft2d(rdft, fft_length=self.shape[:-2])
          kernel = tf.transpose(kernel, (2, 3, 0, 1))
      else:
          assert self.shape.rank == 5, self.shape
          kernel = tf.signal.irfft3d(rdft, fft_length=self.shape[:-2])
          kernel = tf.transpose(kernel, (2, 3, 4, 0, 1))
      if compute_dtype is not None:
          # If we had to bump up precision to 32 bits, finally cast to compute_dtype
          # here. In other cases, this should be a no-op.
          kernel = tf.cast(kernel, compute_dtype)
      return kernel
  
imports: import abc
  from typing import Any, Dict
  import tensorflow
  from tensorflow_compression.python.ops import math_ops
label_desc: Use image node_id 4 for calling the RDFTParameter obj's underlying member method code with example usage: obj.__call__(compute_dtype) and returns: kernel