parameters: (x, expk0, expk1, algorithm='N')
return_statement: return output
docstring: compute 2D inverse discrete cosine transformation, using N-FFT or 2N-FFT
docstring_summary: compute 2D inverse discrete cosine transformation, using N-FFT or 2N-FFT
docstring_tokens: compute 2D inverse discrete cosine transformation using N - FFT or 2N - FFT
function: def idct2(x, expk0, expk1, algorithm='N'):
      """compute 2D inverse discrete cosine transformation, using N-FFT or 2N-FFT
      """
      if x.is_cuda:
          if algorithm == 'N': 
              output = dct_cuda.idct2(x, expk0, expk1)
              #output = dct_cuda.idct(dct_cuda.idct(x, expk1).transpose_(dim0=-2, dim1=-1).contiguous(), expk0).transpose_(dim0=-2, dim1=-1).contiguous()
          elif algorithm == '2N': 
              output = dct_cuda.idct2_2N(x, expk0, expk1)
      else:
          if algorithm == 'N': 
              output = dct_cpp.idct2(x, expk0, expk1, torch.get_num_threads())
              #output = dct_cpp.idct(dct_cpp.idct(x, expk1, torch.get_num_threads()).transpose_(dim0=-2, dim1=-1).contiguous(), expk0, torch.get_num_threads()).transpose_(dim0=-2, dim1=-1).contiguous()
          elif algorithm == '2N': 
              output = dct_cpp.idct2_2N(x, expk0, expk1, torch.get_num_threads())
      return output
function_tokens: def idct2 ( x , expk0 , expk1 , algorithm = 'N' ) : if x . is_cuda : if algorithm == 'N' : output = dct_cuda . idct2 ( x , expk0 , expk1 ) #output = dct_cuda.idct(dct_cuda.idct(x, expk1).transpose_(dim0=-2, dim1=-1).contiguous(), expk0).transpose_(dim0=-2, dim1=-1).contiguous() elif algorithm == '2N' : output = dct_cuda . idct2_2N ( x , expk0 , expk1 ) else : if algorithm == 'N' : output = dct_cpp . idct2 ( x , expk0 , expk1 , torch . get_num_threads ( ) ) #output = dct_cpp.idct(dct_cpp.idct(x, expk1, torch.get_num_threads()).transpose_(dim0=-2, dim1=-1).contiguous(), expk0, torch.get_num_threads()).transpose_(dim0=-2, dim1=-1).contiguous() elif algorithm == '2N' : output = dct_cpp . idct2_2N ( x , expk0 , expk1 , torch . get_num_threads ( ) ) return output