Skip to content

Slow custom loss function #213

@Moelf

Description

@Moelf
using LossFunctions

my_loss_d(ŷ, y) = LossFunctions.deriv(CrossEntropyLoss(), ŷ, y)
my_loss_dd(ŷ, y) = LossFunctions.deriv2(CrossEntropyLoss(), ŷ, y)


xgboost(train_data, my_loss_d, my_loss_dd; tree_method="gpu_hist", objective="binary:logistic", num_round=10)

This is much slower than if not providing my own loss -- I suspect this is because these functions are scalar version?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions