SEP model

This commit is contained in:
Francesco Gatti
2020-05-03 15:54:39 +02:00
parent 0ef8aaf616
commit 8d45259b15
3 changed files with 22 additions and 20 deletions
+6 -15
View File
@@ -7,18 +7,6 @@ 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");
@@ -26,7 +14,7 @@ int main() {
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,7 @@ int main() {
out1 += ImuNet.odim1.tot();
}
system("cat path.txt | gnuplot -p -e \"set datafile separator ' '; plot '-'\"");
system("cat path.txt | cut -d\" \" -f1,2 | gnuplot -p -e \"set datafile separator ' '; plot '-'\"");
system("cat path.txt | cut -d\" \" -f6 | gnuplot -p -e \"set datafile separator ' '; plot '-'\"");
return ret_cudnn;
}
+2 -2
View File
@@ -16,9 +16,9 @@ def bin_write(f, data):
bin = struct.pack(fmt, *data)
f.write(bin)
# USE weight_exporter to generare wgs bins
if __name__ == '__main__':
print("DATA FORMAT: ", keras.backend.image_data_format())