def sample(self): """ Ref: :py:meth:`pyro.distributions.distribution.Distribution.sample`. """ return Variable(torch.bernoulli(self.ps.data))