Skip to content
Snippets Groups Projects
Commit c32f4c08 authored by André Anjos's avatar André Anjos :speech_balloon:
Browse files

[all] Removed unused variables; Fix other return values

parent 994d216f
No related branches found
No related tags found
1 merge request!12Streamlining
Pipeline #38204 passed
...@@ -83,7 +83,7 @@ class MobileNetV2(torch.nn.Module): ...@@ -83,7 +83,7 @@ class MobileNetV2(torch.nn.Module):
self.m2u = m2u self.m2u = m2u
block = InvertedResidual block = InvertedResidual
input_channel = 32 input_channel = 32
last_channel = 1280 #last_channel = 1280
interverted_residual_setting = [ interverted_residual_setting = [
# t, c, n, s # t, c, n, s
[1, 16, 1, 1], [1, 16, 1, 1],
......
...@@ -239,7 +239,7 @@ class HEDSoftJaccardBCELogitsLoss(_Loss): ...@@ -239,7 +239,7 @@ class HEDSoftJaccardBCELogitsLoss(_Loss):
loss = self.alpha * bceloss + (1 - self.alpha) * (1 - softjaccard) loss = self.alpha * bceloss + (1 - self.alpha) * (1 - softjaccard)
loss_over_all_inputs.append(loss.unsqueeze(0)) loss_over_all_inputs.append(loss.unsqueeze(0))
final_loss = torch.cat(loss_over_all_inputs).mean() final_loss = torch.cat(loss_over_all_inputs).mean()
return loss return final_loss
class MixJacLoss(_Loss): class MixJacLoss(_Loss):
......
...@@ -124,10 +124,8 @@ def do_eval( ...@@ -124,10 +124,8 @@ def do_eval(
# Collect overall metrics # Collect overall metrics
metrics = [] metrics = []
num_images = len(data_loader)
for samples in tqdm(data_loader): for samples in tqdm(data_loader):
names = samples[0] names = samples[0]
images = samples[1]
ground_truths = samples[2] ground_truths = samples[2]
if prediction_extension is None: if prediction_extension is None:
......
...@@ -354,7 +354,6 @@ def plot_overview(outputfolders, title): ...@@ -354,7 +354,6 @@ def plot_overview(outputfolders, title):
re_ups = [] re_ups = []
re_lows = [] re_lows = []
names = [] names = []
params = []
for folder in outputfolders: for folder in outputfolders:
# metrics # metrics
metrics_path = os.path.join(folder, "results/Metrics.csv") metrics_path = os.path.join(folder, "results/Metrics.csv")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment