(self)
| 54 | self.var = self.std = torch.zeros_like(self.mean).to(device=self.parameters.device) |
| 55 | |
| 56 | def sample(self): |
| 57 | x = self.mean + self.std * torch.randn(self.mean.shape).to(device=self.parameters.device) |
| 58 | return x |
| 59 | |
| 60 | def kl(self, other=None): |
| 61 | if self.deterministic: |
no outgoing calls
no test coverage detected