Spaces:
Running
Running
MilesCranmer
commited on
Commit
·
3a557a9
1
Parent(s):
a2f31d9
Remove unneeded domain checks
Browse files- julia/sr.jl +0 -13
julia/sr.jl
CHANGED
@@ -335,13 +335,6 @@ function scoreFunc(tree::Node)::Float32
|
|
335 |
if prediction == nothing
|
336 |
return 1f9
|
337 |
end
|
338 |
-
for i=1:len
|
339 |
-
# Do this when using fastmath, to check for domain errors
|
340 |
-
# TODO: Is this needed?
|
341 |
-
if prediction[i] > 1f20 || prediction[i] < -1f20
|
342 |
-
return 1f9
|
343 |
-
end
|
344 |
-
end
|
345 |
if weighted
|
346 |
mse = MSE(prediction, y, weights)
|
347 |
else
|
@@ -359,12 +352,6 @@ function scoreFuncBatch(tree::Node)::Float32
|
|
359 |
if prediction == nothing
|
360 |
return 1f9
|
361 |
end
|
362 |
-
for i=1:batchSize
|
363 |
-
# Do this when using fastmath, to check for domain errors
|
364 |
-
if prediction[i] > 1f20 || prediction[i] < -1f20
|
365 |
-
return 1f9
|
366 |
-
end
|
367 |
-
end
|
368 |
size_adjustment = 1f0
|
369 |
batch_y = y[batch_idx]
|
370 |
if weighted
|
|
|
335 |
if prediction == nothing
|
336 |
return 1f9
|
337 |
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
338 |
if weighted
|
339 |
mse = MSE(prediction, y, weights)
|
340 |
else
|
|
|
352 |
if prediction == nothing
|
353 |
return 1f9
|
354 |
end
|
|
|
|
|
|
|
|
|
|
|
|
|
355 |
size_adjustment = 1f0
|
356 |
batch_y = y[batch_idx]
|
357 |
if weighted
|