lf.n_hop = n_hop
        self.center = center
        self.sample_rate = sample_rate

        if window is not None:
            self.window = nn.Parameter(torch.hann_window(n_fft), requires_grad=False)
        else:
            self.window = window

    def forward(self, X: Tensor, length: Optional[int] = None) -&gt; Tensor:
        shape = X.size()
        X = X.reshape(-1, shape[-3], shape[-2], shape[-1])

        y = torch.istft(
            X,
            n_fft=self.n_fft,
            hop_length=self.n