# jdit.assessment¶

## FID¶

jdit.assessment.FID_score(source, target, sample_prop=1.0, gpu_ids=(), dim=2048, batchsize=128, verbose=True)[source]

Compute FID score from Tensor, DataLoader or a directorypath.

Parameters: source – source data. target – target data. sample_prop – If passing a Tensor source, set this rate to sample a part of data from source. gpu_ids – gpu ids. dim – The number of features. Three options available. 64: The first max pooling features of Inception. 192: The Second max pooling features of Inception. 768: The Pre-aux classifier features of Inception. 2048: The Final average pooling features of Inception. Default: 2048. batchsize – Only using for passing paths of source and target. verbose – If show processing log. fid score

Attention

If you are passing Tensor as source and target. Make sure you have enough memory to load these data in _InceptionV3. Otherwise, please passing path of DataLoader to compute them step by step.

Example:

>>> from jdit.dataset import Cifar10
>>> loader = Cifar10(root=r"../../datasets/cifar10", batch_shape=(32, 3, 32, 32))