Skip to content

Dummy example gives non intuitive result #7

@ashual

Description

@ashual

Hello and thank you for this great paper and implementation.

I've run your method with a dummy example:

    fake_features = torch.ones((1024, 4096))
    real_features = torch.ones((1024, 4096))

and would expect 1.0 for both density and coverage but actually got 0.0

There are two changes to the Density metric that might help

  1. Add less or equal
    (distance_real_fake < np.expand_dims(real_nearest_neighbour_distances, axis=1)
    =>
    (distance_real_fake <= np.expand_dims(real_nearest_neighbour_distances, axis=1)
  2. Add clamp with self.neareset_k and enforce [0,1] result
    (distance_real_fake <= real_nearest_neighbour_distances.unsqueeze(1)).sum(dim=0) => (distance_real_fake <= real_nearest_neighbour_distances.unsqueeze(1)).sum(dim=0).clamp(0, self.nearest_k)

Is it make sense or do I miss something?

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