Skip to content

Commit eec771e

Browse files
authored
Fix scaling that affects constant series (#294)
1 parent 94e20ea commit eec771e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/chronos/chronos_bolt.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def forward(
8888
scale = torch.nan_to_num(
8989
torch.nanmean((x - loc).square(), dim=-1, keepdim=True).sqrt(), nan=1.0
9090
)
91-
scale = torch.where(scale == 0, torch.abs(loc) + self.eps, scale)
91+
scale = torch.where(scale == 0, self.eps, scale)
9292
else:
9393
loc, scale = loc_scale
9494

0 commit comments

Comments
 (0)