(fake_activations, real_activations)
Returns the FID based on activations.

  Args:
    fake_activations: NumPy array with fake activations.
    real_activations: NumPy array with real activations.
  Returns:
    A float, the Frechet Inception Distance.
Returns the FID based on activations.
Returns the FID based on activations .
def compute_fid_from_activations(fake_activations, real_activations):
  """Returns the FID based on activations.

  Args:
    fake_activations: NumPy array with fake activations.
    real_activations: NumPy array with real activations.
  Returns:
    A float, the Frechet Inception Distance.
  """
  logging.info("Computing FID score.")
  assert fake_activations.shape == real_activations.shape
  with tf.Session(graph=tf.Graph()) as sess:
    fake_activations = tf.convert_to_tensor(fake_activations)
    real_activations = tf.convert_to_tensor(real_activations)
    fid = tfgan.eval.frechet_classifier_distance_from_activations(
        real_activations=real_activations,
        generated_activations=fake_activations)
    return sess.run(fid)
def compute_fid_from_activations ( fake_activations , real_activations ) : logging . info ( "Computing FID score." ) assert fake_activations . shape == real_activations . shape with tf . Session ( graph = tf . Graph ( ) ) as sess : fake_activations = tf . convert_to_tensor ( fake_activations ) real_activations = tf . convert_to_tensor ( real_activations ) fid = tfgan . eval . frechet_classifier_distance_from_activations ( real_activations = real_activations , generated_activations = fake_activations ) return sess . run ( fid )