Skip to content

Getting loss value for testing set #799

Discussion options

You must be logged in to vote

Hm, maybe try

summed_loss = jl.seval(
"""
(pred, target) -> begin
    loss = L2DistLoss()
    sum(loss(pred[i], target[i]) for i in eachindex(pred, target))
end
"""
)
summed_loss(y_pred_test, y_test)

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@VittoriaOssanna
Comment options

@MilesCranmer
Comment options

Answer selected by VittoriaOssanna
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants