Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Possibility of optimisation in Focal Loss implementation #1235

Open
@vedantdalimkar

Description

@vedantdalimkar

I was training a multiclass model using focal loss provided by SMP. However, it was proving to be a bottleneck in training as switching torch's CrossEntropyLoss with smp's FocalLoss increased training time by a factor of 6x.

I think this may be caused by the suboptimal multiclass mode implementation where the function iterates over each class and calls the focal_loss_with_logits function seperately. This operation can be vectorised by calling focal_loss_with_logits once for all classes where target would be the one-hot encoding of the segmentation mask.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp