https://pytorch.org/docs/stable/torch.html#torch.irfft 4

Due to the conjugate symmetry,  input  do not need to contain the full complex frequency values. Roughly half of the values will be sufficient, as is the case when  input  is given by  rfft()  with  rfft(signal, onesided=True) . In such case, set the  onesided  argument of this method to  True . Moreover, the original signal shape information can sometimes be lost, optionally set  signal_sizes  to be the size of the original signal (without the batch dimensions if in batched mode) to recover it with correct shape.