(self, x, x_mask, reverse=False, **kwargs)
| 364 | |
| 365 | class Log(nn.Module): |
| 366 | def forward(self, x, x_mask, reverse=False, **kwargs): |
| 367 | if not reverse: |
| 368 | y = torch.log(torch.clamp_min(x, 1e-5)) * x_mask |
| 369 | logdet = torch.sum(-y, [1, 2]) |
| 370 | return y, logdet |
| 371 | else: |
| 372 | x = torch.exp(x) * x_mask |
| 373 | return x |
| 374 | |
| 375 | |
| 376 | class Flip(nn.Module): |
nothing calls this directly
no outgoing calls
no test coverage detected