From cd7f606a5f33ca03ea1b5c6d860b8b2e67d6572d Mon Sep 17 00:00:00 2001 From: weishengyu Date: Sat, 5 Jun 2021 16:02:22 +0800 Subject: [PATCH] dbg --- ppcls/engine/trainer.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ppcls/engine/trainer.py b/ppcls/engine/trainer.py index c7da707f3..0e016c7c4 100644 --- a/ppcls/engine/trainer.py +++ b/ppcls/engine/trainer.py @@ -353,12 +353,12 @@ class Trainer(object): block_fea, gallery_feas, transpose_y=True) if query_camera_id is not None: camera_id_block = camera_id_blocks[block_idx] - camera_id_same = (camera_id_block == gallery_camera_id.t()) + camera_id_same = (camera_id_block != gallery_camera_id.t()) image_id_block = image_id_blocks[block_idx] - image_id_same = (image_id_block == gallery_img_id.t()) + image_id_same = (image_id_block != gallery_img_id.t()) - keep_mask = not (camera_id_same and image_id_same) + keep_mask = paddle.logical_or(camera_id_same, image_id_same) similarity_matrix = similarity_matrix * keep_mask.astype( "float32") if cum_similarity_matrix is None: