2d DCT Transform

Hi!
I want to transform a tensor by 2d DCT transform… How could I do this using PyTorch that the output be as the same as matlab?

Hi,

I think this post can answer your questions:

Bests

thanks for your reply @ Nikronic… but it doesn’t work properly and its outputs are wrong (at least in my problem) …

What is your case? Can you create a toy example using numpy?
I have not worked with the code I referenced but at a glimpse, it seems alright.