File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -28,9 +28,9 @@ def get_image_metrics_for_samples(
28
28
def sample_fn (arg ):
29
29
del arg
30
30
samples = generator (prior .sample (max_classifier_batch ))
31
- # Ensure data is in [0 , 1], as expected by TFGAN.
31
+ # Samples must be in [-1 , 1], as expected by TFGAN.
32
32
# Resizing to appropriate size is done by TFGAN.
33
- return data_processor . postprocess ( samples )
33
+ return samples
34
34
35
35
fake_outputs = tfgan .eval .sample_and_run_inception (
36
36
sample_fn ,
@@ -39,7 +39,8 @@ def sample_fn(arg):
39
39
fake_logits = fake_outputs ['logits' ]
40
40
inception_score = tfgan .eval .classifier_score_from_logits (fake_logits )
41
41
42
- real_outputs = tfgan .eval .run_inception (real_images , num_batches = num_batches )
42
+ real_outputs = tfgan .eval .run_inception (
43
+ data_processor .preprocess (real_images ), num_batches = num_batches )
43
44
fid = tfgan .eval .frechet_classifier_distance_from_activations (
44
45
real_outputs ['pool_3' ], fake_outputs ['pool_3' ])
45
46
You can’t perform that action at this time.
0 commit comments