pytorch/ignite

Unify metrics output type

オープン

#1,635 opened on 2021/02/12

 (12 件のコメント) (0 件のリアクション) (0 人の担当者)Python (602 件のフォーク)batch import
HacktoberfestPyDataGlobaldocsenhancementhelp wantedmodule: metricsneeds-discussion

Repository metrics

Stars
 (4,313 個のスター)
PR merge metrics
 (平均マージ 18d 23h) (30d で 19 merged PRs)

説明

🚀 Feature

The idea is to verify the output type for all metrics (output of compute function) and update the docs accordingly.

In general, metric's output should be a float number. In some particular cases, like Recall/Precision with average=False, the output is a torch tensor. So, let's see and decide if the output of compute() method can be :

  • def compute() -> float
  • def compute() -> Union[float, torch.Tensor] and tensor is on CPU
  • def compute() -> torch.Tensor with tensor on CPU

To address this FR, we have to make sure for each metric what kind of type it supposes to return and update the docs accordingly.

コントリビューターガイド