sp-uhh / sgmse

Score-based Generative Models (Diffusion Models) for Speech Enhancement and Dereverberation
MIT License
454 stars 69 forks source link

Questions about equation (10) in the paper #41

Closed WangHelin1997 closed 6 months ago

WangHelin1997 commented 6 months ago

Dear authors,

Really nice work! I tried to read the code, and found an issue that the implementation is a little different from that in equation (10). image

In the repo, it's


def _std(self, t):
        # This is a full solution to the ODE for P(t) in our derivations, after choosing g(s) as in self.sde()
        sigma_min, theta, logsig = self.sigma_min, self.theta, self.logsig
        # could maybe replace the two torch.exp(... * t) terms here by cached values **t
        return torch.sqrt(
            (
                sigma_min**2
                * torch.exp(-2 * theta * t)
                * (torch.exp(2 * (theta + logsig) * t) - 1)
                * logsig
            )
            /
            (theta + logsig)
        )```

 in `sgmse/sdes.py`.

Can you explain the differences? Thanks!