Skip to content

Commit

Permalink
Fix/PLS shouldn't exceed last_s (#82)
Browse files Browse the repository at this point in the history
  • Loading branch information
L-M-Sherlock authored Feb 13, 2024
1 parent 0168029 commit 1750cd3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "FSRS-Optimizer"
version = "4.24.1"
version = "4.24.2"
readme = "README.md"
dependencies = [
"matplotlib>=3.7.0",
Expand Down
2 changes: 1 addition & 1 deletion src/fsrs_optimizer/fsrs_optimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def stability_after_failure(self, state: Tensor, r: Tensor) -> Tensor:
* (torch.pow(state[:, 0] + 1, self.w[13]) - 1)
* torch.exp((1 - r) * self.w[14])
)
return new_s
return torch.minimum(new_s, state[:, 0])

def step(self, X: Tensor, state: Tensor) -> Tensor:
"""
Expand Down

0 comments on commit 1750cd3

Please sign in to comment.