output both scores and image features

This commit is contained in:
pangkaicheng
2024-03-25 10:06:12 +08:00
parent 8973479756
commit 2b5dce50bb

View File

@@ -327,9 +327,11 @@ class OutfitMaterTypeAware(OutfitMatcher):
# 输出集 # 输出集
outputs = [ outputs = [
httpclient.InferRequestedOutput("output__0", binary_data=True), httpclient.InferRequestedOutput("output__0", binary_data=True),
httpclient.InferRequestedOutput("output__1", binary_data=True),
] ]
results = client.infer(model_name="outfit_matcher_type_aware", inputs=inputs, outputs=outputs) results = client.infer(model_name="outfit_matcher_type_aware", inputs=inputs, outputs=outputs)
# 推理 # 推理
# 取结果 # 取结果
scores = torch.from_numpy(results.as_numpy("output__0")) scores = torch.from_numpy(results.as_numpy("output__0")) # Shape (N, 1)
return scores # Shape (N, 1) features = torch.from_numpy(results.as_numpy("output__1")) # Shape (N, -1, 64)
return scores, features