Skip to content

Commit

Permalink
Fix linter errors
Browse files Browse the repository at this point in the history
  • Loading branch information
mseitzer committed Mar 16, 2024
1 parent 8e661df commit cd3dec0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
4 changes: 2 additions & 2 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ def lint(session):
@nox.session(python=["3.8", "3.9", "3.10", "3.11", "3.12"])
def tests(session):
session.install(
'torch==2.2.1',
'torchvision',
'torch==2.2.1',
'torchvision',
'--index-url', 'https://download.pytorch.org/whl/cpu'
)
session.install('.')
Expand Down
11 changes: 8 additions & 3 deletions src/pytorch_fid/fid_score.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,9 @@ def tqdm(x):
help=('Dimensionality of Inception features to use. '
'By default, uses pool3 features'))
parser.add_argument('--save-stats', action='store_true',
help=('Generate an npz archive from a directory of samples. '
'The first path is used as input and the second as output.'))
help=('Generate an npz archive from a directory of '
'samples. The first path is used as input and the '
'second as output.'))
parser.add_argument('path', type=str, nargs=2,
help=('Paths to the generated images or '
'to .npz statistic files'))
Expand Down Expand Up @@ -307,7 +308,11 @@ def main():
num_workers = args.num_workers

if args.save_stats:
save_fid_stats(args.path, args.batch_size, device, args.dims, num_workers)
save_fid_stats(args.path,
args.batch_size,
device,
args.dims,
num_workers)
return

fid_value = calculate_fid_given_paths(args.path,
Expand Down

0 comments on commit cd3dec0

Please sign in to comment.