提交 4a41326a 编写于 作者: J jrzaurin

remove ignore comment

上级 c0f2e787
......@@ -62,7 +62,7 @@ class CategoricalAccuracy(Metric):
def __call__(self, y_pred:Tensor, y_true:Tensor) -> np.ndarray:
top_k = (y_pred.topk(self.top_k,1)[1])
true_k = y_true.view(len(y_true),1).expand_as(top_k) # type: ignore (ignore len vs .size())
true_k = y_true.view(len(y_true),1).expand_as(top_k) # type: ignore
self.correct_count += top_k.eq(true_k).float().sum().item()
self.total_count += len(y_pred) # type: ignore
accuracy = float(self.correct_count) / float(self.total_count)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册