sp-uhh / sgmse

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

Questions about equation (10) in the paper #41

Closed WangHelin1997 closed 9 months ago

WangHelin1997 commented 9 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!
a897456 commented 1 week ago

这个公式的代码 好像确实和paper中的公式(10)对应不上,你当时是怎么理解的?