0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

【技術】BCEWithLogitsLoss

Posted at

どんな技術?

BCEWithLogitsLossとは、バイナリ分類タスクにおける損失関数のこと。

通常のバイナリクロスエントロピー損失にシグモイド関数を内部で組み込んだものである。

仕組み

BCEWithLogitsLossでは、シグモイド関数とバイナリクロスエントロピー損失をまとめて計算する。

シグモイド関数

xを確率に変換する。
IMG_2045.jpeg

バイナリクロスエントロピー損失

小さいものは0に、大きいものは1に近づけるようにする。
IMG_2046.jpeg

BCEWithLogitsLoss

IMG_2047.jpeg

使われる場面

バイナリ分類タスク

「犬か猫か」や、「正解か不正解か」など

マルチラベル分類タスク

「1つの画像に犬も猫も映っているかもしれない」などの独立した複数のラベルを扱う場合

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?