From cf9c7bad75e74f184b9316df1acd4b9ba123045b Mon Sep 17 00:00:00 2001 From: xunshengliuyin <49332629+xunshengliuyin@users.noreply.github.com> Date: Wed, 2 Sep 2020 16:52:26 +0800 Subject: [PATCH] Update eval.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [len(output) / 2]在7scenes中是0.5,导致代码无法运行 --- eval.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/eval.py b/eval.py index 2ff6cd6..79738e3 100644 --- a/eval.py +++ b/eval.py @@ -113,8 +113,8 @@ target[:, :3] = (target[:, :3] * pose_s) + pose_m # take the middle prediction - pred_poses[idx, :] = output[len(output) / 2] - targ_poses[idx, :] = target[len(target) / 2] + pred_poses[idx, :] = output + targ_poses[idx, :] = target # calculate losses t_loss = np.asarray([t_criterion(p, t) for p, t in zip(pred_poses[:, :3], targ_poses[:, :3])]) @@ -133,4 +133,4 @@ plt.plot(gt_pose[0, 1], gt_pose[0, 0], 'y*', markersize=15) plt.show(block=True) image_filename = osp.join(osp.expanduser(opt.results_dir), '{:s}.png'.format(opt.exp_name)) -fig.savefig(image_filename) \ No newline at end of file +fig.savefig(image_filename)