What is L
in the custom objectives?
#372
-
Where does the "L" in L(Inf) come from? For your reference, "jl" is my julia helper object, and "jl" is defined as
Specifically, when I run:
in my Python3 terminal, the Julia interpreter gives me this error in the terminal:
Why this is somewhat important: When I pass into my Julia objective function a lot of the math functions that my model.equations_ contains, the Julia helper's objective function returns a different loss value from what the model.equations_ reports as the loss value in the "loss" column for that math function. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Note that If you want to use |
Beta Was this translation helpful? Give feedback.
L
is just a type variable that you have in the loss functions — it’s based on the dataset type ofDataset{T,L}
that you would need to declare in the function signature.L
could be aFloat32
or aFloat64
or something else.Note that
L(Inf)
just means: “convert infinity to typeL
”.If you want to use
L
from the loss function in other functions, you could pass it. But normally all you need to do is just wrap the output of the other function withL(…)
to convert whatever numerical type it outputs.