Spaces:
Sleeping
Sleeping
MilesCranmer
commited on
Commit
•
fa43750
1
Parent(s):
6622663
Change internal loss name to prevent conflicts
Browse files- pysr/sr.py +2 -2
pysr/sr.py
CHANGED
@@ -438,13 +438,13 @@ greater=SymbolicRegression.greater
|
|
438 |
relu=SymbolicRegression.relu
|
439 |
logical_or=SymbolicRegression.logical_or
|
440 |
logical_and=SymbolicRegression.logical_and
|
441 |
-
|
442 |
|
443 |
options = SymbolicRegression.Options(binary_operators={'(' + tuple_fix(binary_operators) + ')'},
|
444 |
unary_operators={'(' + tuple_fix(unary_operators) + ')'},
|
445 |
{constraints_str}
|
446 |
parsimony={parsimony:f}f0,
|
447 |
-
loss=
|
448 |
alpha={alpha:f}f0,
|
449 |
maxsize={maxsize:d},
|
450 |
maxdepth={maxdepth:d},
|
|
|
438 |
relu=SymbolicRegression.relu
|
439 |
logical_or=SymbolicRegression.logical_or
|
440 |
logical_and=SymbolicRegression.logical_and
|
441 |
+
_custom_loss = {loss}
|
442 |
|
443 |
options = SymbolicRegression.Options(binary_operators={'(' + tuple_fix(binary_operators) + ')'},
|
444 |
unary_operators={'(' + tuple_fix(unary_operators) + ')'},
|
445 |
{constraints_str}
|
446 |
parsimony={parsimony:f}f0,
|
447 |
+
loss=_custom_loss,
|
448 |
alpha={alpha:f}f0,
|
449 |
maxsize={maxsize:d},
|
450 |
maxdepth={maxdepth:d},
|