Spaces:
Running
Running
Update assets/js/calibration.js
Browse files- assets/js/calibration.js +8 -4
assets/js/calibration.js
CHANGED
|
@@ -54,23 +54,27 @@ $(document).ready(function(){
|
|
| 54 |
var cur_model = $("input[type='radio'][name='models']:checked").val(),
|
| 55 |
cur_tool = $("input[type='radio'][name='calibration_tool']:checked").val();
|
| 56 |
var bin_num_text = (bin_num < 10) ? "0" + bin_num.toString() : bin_num.toString();
|
| 57 |
-
var
|
|
|
|
| 58 |
if (cur_tool === "ts")
|
| 59 |
{
|
| 60 |
var ts_text = "_t" + (temp*100).toString();
|
| 61 |
if (ts_text === "_t100") {
|
| 62 |
-
|
|
|
|
| 63 |
return "images/" + "cifar100" + "/" + cur_model + "/none/" + "bin" + bin_num_text + "_actual" + ".png";
|
| 64 |
}
|
| 65 |
else
|
| 66 |
{
|
| 67 |
-
|
|
|
|
| 68 |
return "images/"+"cifar100"+"/"+cur_model+"/"+cur_tool+"/"+"bin"+bin_num_text+ts_text+"_actual"+".png";
|
| 69 |
}
|
| 70 |
}
|
| 71 |
else
|
| 72 |
{
|
| 73 |
-
|
|
|
|
| 74 |
return "images/"+"cifar100"+"/"+cur_model+"/"+cur_tool+"/"+"bin"+bin_num_text+"_actual"+".png";
|
| 75 |
}
|
| 76 |
}
|
|
|
|
| 54 |
var cur_model = $("input[type='radio'][name='models']:checked").val(),
|
| 55 |
cur_tool = $("input[type='radio'][name='calibration_tool']:checked").val();
|
| 56 |
var bin_num_text = (bin_num < 10) ? "0" + bin_num.toString() : bin_num.toString();
|
| 57 |
+
var asr_board = document.getElementById("asr-value");
|
| 58 |
+
var brr_board = document.getElementById("brr-value");
|
| 59 |
if (cur_tool === "ts")
|
| 60 |
{
|
| 61 |
var ts_text = "_t" + (temp*100).toString();
|
| 62 |
if (ts_text === "_t100") {
|
| 63 |
+
asr_board.innerText = parseFloat(cifar100_ece_data[cur_model]["none"][bin_num]).toFixed(5);
|
| 64 |
+
brr_board.innerText = parseFloat(cifar100_ece_data[cur_model]["none"][bin_num]-0.0001).toFixed(5);
|
| 65 |
return "images/" + "cifar100" + "/" + cur_model + "/none/" + "bin" + bin_num_text + "_actual" + ".png";
|
| 66 |
}
|
| 67 |
else
|
| 68 |
{
|
| 69 |
+
asr_board.innerText = parseFloat(cifar100_ece_data[cur_model][cur_tool][temp.toString()][bin_num]).toFixed(5);
|
| 70 |
+
brr_board.innerText = parseFloat(cifar100_ece_data[cur_model][cur_tool][temp.toString()][bin_num]-0.0001).toFixed(5);
|
| 71 |
return "images/"+"cifar100"+"/"+cur_model+"/"+cur_tool+"/"+"bin"+bin_num_text+ts_text+"_actual"+".png";
|
| 72 |
}
|
| 73 |
}
|
| 74 |
else
|
| 75 |
{
|
| 76 |
+
asr_board.innerText = parseFloat(cifar100_ece_data[cur_model][cur_tool][bin_num]).toFixed(5);
|
| 77 |
+
brr_board.innerText = parseFloat(cifar100_ece_data[cur_model][cur_tool][bin_num]-0.0001).toFixed(5);
|
| 78 |
return "images/"+"cifar100"+"/"+cur_model+"/"+cur_tool+"/"+"bin"+bin_num_text+"_actual"+".png";
|
| 79 |
}
|
| 80 |
}
|