GitHub logo

GitHub

Differentiable sign/round/floor for PyTorch

Artificial Intelligence Developer Tools GitHub Open Source

PyTorch's sign, round, floor, and argmax break gradients. Existing fixes (STE, Gumbel-Softmax) require rewriting your model. SLL-Core is zero-intrusive: with sll.linearize(): y = torch.sign(x) # now differentiable! loss.backward() Only linearizes inside an ε-band around decision boundaries. Everywhere else stays exactly hard. Zero deployment overhead. pip install sll-core

投票数: 0
← 投稿一覧に戻る