macos, torch version:1.7.1
Python API:
import torch
x = torch.rand([2, 441344], dtype=float);
y = torch.stft(x, 4096)
print(y.shape)
output:torch.Size([2, 2049, 432, 2])
C++ API
auto wav = torch::rand({2, 441344});
auto stft = torch::stft(wav, 4096);
std::cout << “output sizes:” << stft.sizes() << std::endl;
output sizes::[2, 2049, 428, 2]
Why?