This commit is contained in:
Francesco Gatti
2020-05-03 15:58:00 +02:00
24 changed files with 4531 additions and 68 deletions
+8 -16
View File
@@ -7,26 +7,14 @@ const char *i2_bin = "imuodom/layers/input2.bin";
const char *o0_bin = "imuodom/layers/output0.bin";
const char *o1_bin = "imuodom/layers/output1.bin";
const char *c0_bin = "imuodom/layers/conv1d_7.bin";
const char *c1_bin = "imuodom/layers/conv1d_8.bin";
const char *c2_bin = "imuodom/layers/conv1d_9.bin";
const char *c3_bin = "imuodom/layers/conv1d_10.bin";
const char *c4_bin = "imuodom/layers/conv1d_11.bin";
const char *c5_bin = "imuodom/layers/conv1d_12.bin";
const char *l0_bin = "imuodom/layers/bidirectional_3.bin";
const char *l1_bin = "imuodom/layers/bidirectional_4.bin";
const char *d0_bin = "imuodom/layers/dense_3.bin";
const char *d1_bin = "imuodom/layers/dense_4.bin";
int main() {
downloadWeightsifDoNotExist(i0_bin, "imuodom", "https://cloud.hipert.unimore.it/s/ZAy34K5w2ixED6x/download");
downloadWeightsifDoNotExist(i0_bin, "imuodom", "https://cloud.hipert.unimore.it/s/BBSEbEbQbPKxp4s/download");
tk::dnn::ImuOdom ImuNet;
ImuNet.init("imuodom/layers/");
const int N = 10000; //19513;
const int N = 19513;
// Network layout
tk::dnn::dataDim_t dim0(1, 4, 1, 100);
@@ -60,7 +48,9 @@ int main() {
//TIMER_STOP
// log path
path<<ImuNet.odomPOS(0)<<" "<<ImuNet.odomPOS(1)<<" "<< ImuNet.odomPOS(2)<<"\n";
path<<ImuNet.odomPOS(0)<<" "<<ImuNet.odomPOS(1)<<" "<< ImuNet.odomPOS(2)<<" ";
path<<ImuNet.odomEULER(0)<<" "<<ImuNet.odomEULER(1)<<" "<< ImuNet.odomEULER(2)<<"\n";
path.flush();
// Print real test
@@ -77,6 +67,8 @@ int main() {
out1 += ImuNet.odim1.tot();
}
int err = system("cat path.txt | gnuplot -p -e \"set datafile separator ' '; plot '-'\"");
int err = 0;
err = system("cat path.txt | cut -d\" \" -f1,2 | gnuplot -p -e \"set datafile separator ' '; plot '-'\"");
err = system("cat path.txt | cut -d\" \" -f6 | gnuplot -p -e \"set datafile separator ' '; plot '-'\"");
return ret_cudnn;
}