mirror of
https://github.com/PaddlePaddle/PaddleClas.git
synced 2025-06-03 21:55:06 +08:00
Update retrieval.py
This commit is contained in:
parent
f61b531047
commit
d388d69a63
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user