提交 d954f738 编写于 作者: W weishengyu

remove to_tensor

上级 b48d2c7a
......@@ -335,12 +335,9 @@ class Trainer(object):
name='gallery')
query_feas, query_img_id, query_camera_id = self._cal_feature(
name='query')
gallery_img_id = paddle.to_tensor([gallery_img_id]).t()
gallery_img_id = gallery_img_id.t()
if gallery_camera_id is not None:
gallery_camera_id = paddle.to_tensor([gallery_camera_id]).t()
query_img_id = paddle.to_tensor(query_img_id)
if query_camera_id is not None:
query_camera_id = paddle.to_tensor(query_camera_id)
gallery_camera_id = gallery_camera_id.t()
# step2. do evaluation
sim_block_size = self.config["Global"].get("sim_block_size", 1)
sections = [sim_block_size] * (len(query_feas) // sim_block_size)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册