forked from ostris/ai-toolkit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpytorch-fid.nix
54 lines (47 loc) · 970 Bytes
/
pytorch-fid.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
{
lib,
pythonRelaxDepsHook,
buildPythonPackage,
fetchFromGitHub,
setuptools,
wheel,
numpy,
pillow,
scipy,
torch,
torchvision,
}:
buildPythonPackage rec {
pname = "pytorch-fid";
version = "master";
pyproject = true;
src = fetchFromGitHub {
owner = "mseitzer";
repo = "pytorch-fid";
rev = version;
hash = "sha256-L/Ka+p1Fl/Lge1V/ry6gqS5iswAKnfxggiMI446Gtlw=";
};
build-system = [
setuptools
wheel
];
dependencies = [
numpy
pillow
scipy
torch
torchvision
];
nativeBuildInputs = [ pythonRelaxDepsHook ];
pythonRelaxDeps = [ "torch" ];
pythonImportsCheck = [
"pytorch_fid"
];
meta = {
description = "Compute FID scores with PyTorch";
homepage = "https://github.com/mseitzer/pytorch-fid";
changelog = "https://github.com/mseitzer/pytorch-fid/blob/${src.rev}/CHANGELOG.md";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ ];
};
}