提交 f3f1c989 编写于 作者: D dongshuilong

fix yaml bugs

上级 fa2b698a
......@@ -148,9 +148,9 @@ Infer:
Metric:
Train:
- Topk:
k: [1, 5]
- TopkAcc:
topk: [1, 5]
Eval:
- Topk:
k: [1, 5]
- TopkAcc:
topk: [1, 5]
......@@ -147,7 +147,7 @@ Metric:
Eval:
- Recallk:
topk: [1, 5]
- mAP:
- mAP: {}
Infer:
infer_imgs: "docs/images/whl/demo.jpg"
......
......@@ -39,9 +39,8 @@ class TopkAcc(nn.Layer):
class mAP(nn.Layer):
def __init__(self, name="mAP"):
def __init__(self):
super().__init__()
self.name = name
def forward(self, similarities_matrix, query_img_id, gallery_img_id):
metric_dict = dict()
......@@ -49,14 +48,13 @@ class mAP(nn.Layer):
gallery_img_id)
mAP = np.mean(all_AP)
metric_dict[self.name] = mAP
metric_dict["mAP"] = mAP
return metric_dict
class mINP(nn.Layer):
def __init__(self, name="mINP"):
def __init__(self):
super().__init__()
self.name = name
def forward(self, similarities_matrix, query_img_id, gallery_img_id):
metric_dict = dict()
......@@ -64,7 +62,7 @@ class mINP(nn.Layer):
gallery_img_id)
mINP = np.mean(all_INP)
metric_dict[self.name] = mINP
metric_dict["mINP"] = mINP
return metric_dict
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册