Update retrieval.py

This commit is contained in:
Bin Lu 2021-08-26 19:38:40 +08:00 committed by GitHub
parent f61b531047
commit d388d69a63
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -126,10 +126,10 @@ def cal_feature(evaler, name='gallery'):
batch_feas = paddle.divide(batch_feas, feas_norm)
# 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
if self.config["Global"].get("feature_binarize") == "sign":
if evaler.config["Global"].get("feature_binarize") == "sign":
batch_feas = paddle.sign(batch_feas).astype("float32")
if all_feas is None: