Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added computation of the FID score #23

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

andimarafioti
Copy link
Contributor

Adaptation of score.py to also compute the Fréchet Inception Distance using code provided by the authors of the measure.
It makes sense to add it side to side to the evaluation of the inception measure since the two don't correlate precisely but are built on the same classifier network. In the future, it would be nice to have cleaner code and a better documentation. As it is, there is a lot of repetition between this file and score.py, but I think it's better to push it now than wait until it's perfect.

Adapted score.py to also compute the Fréchet Inception Distance using code provided by the authors of the measure.
x_bin = tf.read_file(x_fp)
x_samps = tf.contrib.ffmpeg.decode_audio(x_bin, tf_ffmpeg_ext, 16000, 1)[:, 0]
x = graph.get_tensor_by_name('x:0')
activations = graph.get_tensor_by_name('classifier/dense/BiasAdd:0')
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like you are taking the logits (a 10-D vector) and compute the FID score on them. Shouldn't this be the activations of one of the earlier pooling layers (e.g. the pool4 layer) as in the original FID score?

However, one issue that would arise if an earlier layer is taken is that the dimensionality of the activations would be too high (it is already 8192 for the pool4 layer) to compute the FID score in a reasonable time. This is because complexity of the matrix square root computation is cubic in the matrix dimensionality.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants