diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7da3597..38042a1 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,13 +2,13 @@ # See https://pre-commit.com/hooks.html for more hooks repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v5.0.0 + rev: v6.0.0 hooks: - id: trailing-whitespace - id: end-of-file-fixer - id: check-yaml - id: check-added-large-files - repo: https://github.com/igorshubovych/markdownlint-cli - rev: v0.45.0 + rev: v0.49.0 hooks: - id: markdownlint-fix diff --git a/examples/ml/fashion-mnist-robustness/spec.vcl b/examples/ml/fashion-mnist-robustness/spec.vcl index 188dc42..7795691 100644 --- a/examples/ml/fashion-mnist-robustness/spec.vcl +++ b/examples/ml/fashion-mnist-robustness/spec.vcl @@ -4,7 +4,7 @@ p : Real @logic capucciAdditive : DifferentiableLogic -capucciAdditive = +capucciAdditive = { trueElement = -infinity , falseElement = infinity , pointwiseNegation = \x -> -x @@ -19,4 +19,3 @@ capucciAdditive = , reduceConjunction = \xs -> (1/p) * log(reduceAdd (exp (p * xs))) , reduceDisjunction = \xs -> (1/p) * log(reduceAdd (exp (-p * xs))) } - diff --git a/examples/ml/fashion-mnist-robustness/train.py b/examples/ml/fashion-mnist-robustness/train.py index 4f34b0f..39ddd47 100644 --- a/examples/ml/fashion-mnist-robustness/train.py +++ b/examples/ml/fashion-mnist-robustness/train.py @@ -26,7 +26,7 @@ def network(x: torch.Tensor) -> torch.Tensor: declarations = loss_pt.load_specification( "spec.vcl", - logic=vcl.DifferentiableLogic.Vehicle, + logic=vcl.DifferentiableLogic.Vehicle, #logic=vcl.DifferentiableLogic.Custom(cappuci) ) @@ -49,4 +49,4 @@ def network(x: torch.Tensor) -> torch.Tensor: total_loss = alpha * task_loss + (1.0 - alpha) * constraint_loss total_loss.backward() - optimizer.step() \ No newline at end of file + optimizer.step()