Skip to content

Commit

Permalink
added keepdim to fba fusion
Browse files Browse the repository at this point in the history
thanks to xymsh #7
  • Loading branch information
MarcoForte authored Apr 12, 2020
1 parent 76751dd commit ece2d24
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion networks/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ def fba_fusion(alpha, img, F, B):
F = torch.clamp(F, 0, 1)
B = torch.clamp(B, 0, 1)
la = 0.1
alpha = (alpha * la + torch.sum((img - B) * (F - B), 1)) / (torch.sum((F - B) * (F - B), 1) + la)
alpha = (alpha * la + torch.sum((img - B) * (F - B), 1, keepdim=True)) / (torch.sum((F - B) * (F - B), 1, keepdim=True) + la)
alpha = torch.clamp(alpha, 0, 1)
return alpha, F, B

Expand Down

0 comments on commit ece2d24

Please # to comment.