def get_z_from_prior(self, size=torch.Size([]), sample=True):
    ' Returns z from prior distribution.\n        Args:\n            size (Size): size of z\n            sample (bool): whether to sample\n        '
    if sample:
        z = self.p0_z.sample(size).to(self.device)
    else:
        z = self.p0_z.mean.to(self.device)
        z = z.expand(*size, *z.size())
    return z
Returns z from prior distribution.
Args:
    size (Size): size of z
    sample (bool): whether to sample
def get_z_from_prior(self, size=torch.Size([]), sample=True):
    ' Returns z from prior distribution.\n        Args:\n            size (Size): size of z\n            sample (bool): whether to sample\n        '
    if sample:
        z = self.p0_z.sample(size).to(self.device)
    else:
        z = self.p0_z.mean.to(self.device)
        z = z.expand(*size, *z.size())
    return z