Skip to content

About Dirichlet distribution #1

@mountains-high

Description

@mountains-high

Hi~
Thank you for providing the great work!

While running, I got the following error message:

ValueError: Expected parameter concentration (Tensor of shape (10,)) of distribution Dirichlet(concentration: torch.Size([10])) to satisfy the constraint IndependentConstraint(GreaterThan(lower_bound=0.0), 1), but found invalid values:
tensor([1.0000, 0.4503, 0.4462, 0.2881, 0.3598, 0.0000, 0.3248, 0.3540, 0.5790,
        0.4990], grad_fn=<SliceBackward0>)

Usage:

diri_list = []
    for i in range(labels):
        m = Dirichlet((normalized_cormat[i,:]))
        diri_list.append(m)

Could you help me to solve this issue, please?
Thank you

And I think these lines are unnecessary https://github.com/Intelligent-Computing-Lab-Yale/PrivateSNN/blob/074f7ad9b4ab8aa351163076d068f1d0ca275689/image_gen_function.py#L166 How do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions