From 1480b09fa486a8f5252e9cd601bee165e9d0cd22 Mon Sep 17 00:00:00 2001
From: natanielruiz <nruiz9@gatech.edu>
Date: 星期一, 30 十月 2017 07:08:04 +0800
Subject: [PATCH] next
---
code/test_preangles.py | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/code/test_preangles.py b/code/test_preangles.py
index eda9312..971e54b 100644
--- a/code/test_preangles.py
+++ b/code/test_preangles.py
@@ -118,9 +118,13 @@
_, roll_bpred = torch.max(roll.data, 1)
# Continuous predictions
- yaw_predicted = angles[:,0].data.cpu()
- pitch_predicted = angles[:,1].data.cpu()
- roll_predicted = angles[:,2].data.cpu()
+ yaw_predicted = utils.softmax_temperature(yaw.data, 1)
+ pitch_predicted = utils.softmax_temperature(pitch.data, 1)
+ roll_predicted = utils.softmax_temperature(roll.data, 1)
+
+ yaw_predicted = torch.sum(yaw_predicted * idx_tensor, 1).cpu() * 3 - 99
+ pitch_predicted = torch.sum(pitch_predicted * idx_tensor, 1).cpu() * 3 - 99
+ roll_predicted = torch.sum(roll_predicted * idx_tensor, 1).cpu() * 3 - 99
# Mean absolute error
yaw_error += torch.sum(torch.abs(yaw_predicted - label_yaw))
--
Gitblit v1.8.0