未验证 提交 d388d69a 编写于 作者: B Bin Lu 提交者: GitHub

Update retrieval.py

上级 f61b5310
...@@ -126,10 +126,10 @@ def cal_feature(evaler, name='gallery'): ...@@ -126,10 +126,10 @@ def cal_feature(evaler, name='gallery'):
batch_feas = paddle.divide(batch_feas, feas_norm) batch_feas = paddle.divide(batch_feas, feas_norm)
# do binarize # do binarize
if self.config["Global"].get("feature_binarize") == "round": if evaler.config["Global"].get("feature_binarize") == "round":
batch_feas = paddle.round(batch_feas).astype("float32") * 2.0 - 1.0 batch_feas = paddle.round(batch_feas).astype("float32") * 2.0 - 1.0
if self.config["Global"].get("feature_binarize") == "sign": if evaler.config["Global"].get("feature_binarize") == "sign":
batch_feas = paddle.sign(batch_feas).astype("float32") batch_feas = paddle.sign(batch_feas).astype("float32")
if all_feas is None: if all_feas is None:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册