GAN-metrics icon indicating copy to clipboard operation
GAN-metrics copied to clipboard

Support for real/fake datasets with unequal sizes

Open shuheng-liu opened this issue 6 years ago • 0 comments

In one_nearest_neighbor.NaiveOneNearestNeighborScorer._set_score(). the lines

length = len(self._argmin)
total = sum(1 for k in range(length) if (k < length / 2) == (self._argmin[k] < length / 2))
self._score = total / length

imply that only works for equally sized real & fake dataset (hence the division by 2).

Consider judging the class label with label_batch from

image_batch, label_batch = self.session.run(next_batch)

in one_nearest_neighbor.NaiveOneNearestNeighborScorer._set_latent()

shuheng-liu avatar Nov 03 '18 13:11 shuheng-liu