code: def test_irfft(self):
      inputs_val = np.random.random((1, N, N)).astype("float32")
      inputs = theano.shared(inputs_val)
  
      fft = theano.gpuarray.fft.curfft(inputs)
      f_fft = theano.function([], fft, mode=mode_with_gpu)
      res_fft = f_fft()
  
      m = fft.type()
      ifft = theano.gpuarray.fft.cuirfft(m)
      f_ifft = theano.function([m], ifft, mode=mode_with_gpu)
      res_ifft = f_ifft(res_fft)
  
      utt.assert_allclose(inputs_val, np.asarray(res_ifft))
  
      inputs_val = np.random.random((1, N, N, 2)).astype("float32")
      inputs = theano.shared(inputs_val)
  
      irfft = theano.gpuarray.fft.cuirfft(inputs)
      f_irfft = theano.function([], irfft, mode=mode_with_gpu)
      res_irfft = f_irfft()
      inputs_ref = inputs_val[..., 0] + inputs_val[..., 1] * 1j
  
      irfft_ref = np.fft.irfftn(inputs_ref, axes=(1, 2))
  
      utt.assert_allclose(irfft_ref, res_irfft, atol=1e-4, rtol=1e-4)
  
file_path: Theano/theano/gpuarray/tests/test_fft.py
imports: from __future__ import absolute_import, print_function, division
  import unittest
  import numpy
  import theano
  import theano.tensor
  from theano.tests import unittest_tools
  import theano.gpuarray.fft
  from .config import mode_with_gpu
  from nose.plugins.skip import SkipTest
  from theano.gpuarray.fft import pygpu_available, skcuda_available, pycuda_available
label_desc: Use image node_id 3 for calling the TestFFT obj's underlying member method code with example usage: obj.test_irfft() without return types