# NOT RUN {
if (torch_is_installed()) {
x = torch_randn(c(4, 4))
torch_rfft(x, 2, onesided=TRUE)
x = torch_randn(c(4, 5))
torch_rfft(x, 2, onesided=TRUE)
y = torch_rfft(x, 2, onesided=TRUE)
torch_irfft(y, 2, onesided=TRUE, signal_sizes=c(4,5)) # recover x
}
# }
Run the code above in your browser using DataLab