Skip to content

Commit

Permalink
[core] Multiply input by 'scale' even when 'steps=0' in expv()
Browse files Browse the repository at this point in the history
  • Loading branch information
aschuh-hf committed Feb 6, 2024
1 parent 351cb5f commit 372b943
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/deepali/core/flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,8 @@ def expv(
if steps < 0:
raise ValueError("expv() 'steps' must be positive value")
if steps == 0:
if abs(scale - 1) > 1e-15:
flow = flow.mul(scale)
return flow
device = flow.device
grid = Grid(shape=flow.shape[2:], align_corners=align_corners)
Expand Down

0 comments on commit 372b943

Please sign in to comment.