Skip to content

Commit

Permalink
autoformat
Browse files Browse the repository at this point in the history
Former-commit-id: da1734a7efa4e810911a3ee4716cec5a03d58967
  • Loading branch information
Javi Ribera committed Mar 7, 2018
1 parent 90e5048 commit 45a4729
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions plant-locator/locate.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@
sum_ape = 0

for batch_idx, (imgs, dictionaries) in tqdm(enumerate(testset_loader),
total=len(testset_loader)):
total=len(testset_loader)):

imgs = Variable(imgs.type(tensortype), volatile=True)

Expand Down Expand Up @@ -235,7 +235,7 @@

if testset.there_is_gt:
# Evaluate Average Percent Error for this image
if bool((target_count==0).data.cpu().numpy()[0][0]):
if bool((target_count == 0).data.cpu().numpy()[0][0]):
ape = 100 * l1_loss.forward(est_count, target_count)
else:
ape = 100 * l1_loss.forward(est_count,
Expand All @@ -246,8 +246,8 @@
# Evaluation using the Averaged Hausdorff Distance
target_locations = \
target_locations[0].data.cpu().numpy().reshape(-1, 2)
ahd = losses.averaged_hausdorff_distance(
centroids, target_locations)
ahd = losses.averaged_hausdorff_distance(centroids,
target_locations)

sum_ahd += ahd

Expand Down

0 comments on commit 45a4729

Please sign in to comment.