Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Apr 15, 2024
1 parent f8a5859 commit 1c9064a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
8 changes: 5 additions & 3 deletions dataset_loaders/dataset_loaders.py
Original file line number Diff line number Diff line change
Expand Up @@ -887,9 +887,11 @@ def __init__(

# Allow up to one level of nesting
self.feats = [
[load_features(df, feats_inner) for feats_inner in feats]
if isinstance(feats, list)
else load_features(df, feats)
(
[load_features(df, feats_inner) for feats_inner in feats]
if isinstance(feats, list)
else load_features(df, feats)
)
for feats in input_features
]

Expand Down
18 changes: 10 additions & 8 deletions evaluation/retrieval_evaluation.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,14 +179,16 @@ def retrieval_evaluation(
frames = frames[:, ::frame_stride]
splits = torch.split(frames, nframes, 1)
splits_pad = [
x
if x.shape[1] == nframes
else torch.index_select(
x,
dim=1,
index=torch.floor(
torch.linspace(0, x.shape[1] - 1, nframes, device=device)
).to(torch.int64),
(
x
if x.shape[1] == nframes
else torch.index_select(
x,
dim=1,
index=torch.floor(
torch.linspace(0, x.shape[1] - 1, nframes, device=device)
).to(torch.int64),
)
)
for x in splits
]
Expand Down

0 comments on commit 1c9064a

Please sign in to comment.