Skip to content

Commit

Permalink
refactor: Removed unused imports, variables and wrappers (#168)
Browse files Browse the repository at this point in the history
* refactor: Removed unused imports

* refactor: Removed unused variable

* refactor: Removed unnecessary wrapper
  • Loading branch information
frgfm authored Nov 13, 2021
1 parent 7d66689 commit 2280ea3
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion holocron/utils/data/collate.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# This program is licensed under the Apache License version 2.
# See LICENSE or go to <https://www.apache.org/licenses/LICENSE-2.0.txt> for full license details.

from typing import List, Tuple
from typing import Tuple

import numpy as np
import torch
Expand Down
1 change: 0 additions & 1 deletion references/segmentation/transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ def __init__(self, prob):

def __call__(self, image, target):
if random.random() < self.prob:
_, width = image.size
image = F.hflip(image)
# Flip the segmentation
target = F.hflip(target)
Expand Down
3 changes: 1 addition & 2 deletions scripts/eval_latency.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ def main(args):

# Warmup
for _ in range(10):
with torch.no_grad():
_ = model(img_tensor)
_ = model(img_tensor)

timings = []

Expand Down
2 changes: 1 addition & 1 deletion tests/test_nn_loss.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import torch
from torch.nn import CrossEntropyLoss, Linear
from torch.nn.functional import cross_entropy, log_softmax
from torch.nn.functional import cross_entropy

from holocron import nn
from holocron.nn import functional as F
Expand Down
1 change: 0 additions & 1 deletion tests/test_requirements.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import re
from datetime import datetime
from pathlib import Path


Expand Down

0 comments on commit 2280ea3

Please sign in to comment.