Skip to content

Commit b325bab

Browse files
goanpecaCopilot
andauthored
Update ignite/metrics/gan/fid.py
Co-authored-by: Copilot <[email protected]>
1 parent 6f9c0f4 commit b325bab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ignite/metrics/gan/fid.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def fid_score(
3737
diff = mu1 - mu2
3838

3939
# Product might be almost singular
40-
covmean, _ = scipy.linalg.sqrtm(sigma1.mm(sigma2).numpy(), disp=False)
40+
covmean, _ = scipy.linalg.sqrtm(sigma1.mm(sigma2).detach().cpu().numpy(), disp=False)
4141
# Numerical error might give slight imaginary component
4242
if np.iscomplexobj(covmean):
4343
if not np.allclose(np.diagonal(covmean).imag, 0, atol=1e-3):

0 commit comments

Comments
 (0)