ape)
# torch.Size([10, 3, 256, 256])
Now, we can compute the FID using torchmetrics.


	Copied
from torchmetrics.image.fid import FrechetInceptionDistance

fid = FrechetInceptionDistance(normalize=True)
fid.update(real_images, real=True)
fid.update(fake_images, real=False)

print(f"FID: {float(fid.compute())}")
# FID: 177.7147216796875
The lower the FID, the better it is. Several things can influence FID here:
Number of images (both real and fa