-
Notifications
You must be signed in to change notification settings - Fork 301
Closed
Description
At this line:
| prob = (-distances * self.codebook_diversity_temperature).softmax(dim = -1) |
distances is already negative from| dist = -cdist(flatten, embed) |
If
distances were positive then the diversity loss would be correct i think. You can check this my comparing:
torch.testing.assert_close(embed_idx, prob.argmax(-1))
At line
| prob = (-distances * self.codebook_diversity_temperature).softmax(dim = -1) |
This will fail.
lucidrains
Metadata
Metadata
Assignees
Labels
No labels