works but it need cleaning
This commit is contained in:
+15
-11
@@ -6,7 +6,6 @@ const char *i1_bin = "../tests/imuodom/layers/input1.bin";
|
||||
const char *i2_bin = "../tests/imuodom/layers/input2.bin";
|
||||
const char *o0_bin = "../tests/imuodom/layers/output0.bin";
|
||||
const char *o1_bin = "../tests/imuodom/layers/output1.bin";
|
||||
const char *output_bin = "../tests/imuodom/layers/output.bin";
|
||||
|
||||
const char *c0_bin = "../tests/imuodom/layers/conv1d_7.bin";
|
||||
const char *c1_bin = "../tests/imuodom/layers/conv1d_8.bin";
|
||||
@@ -17,6 +16,7 @@ const char *c5_bin = "../tests/imuodom/layers/conv1d_12.bin";
|
||||
const char *l0_bin = "../tests/imuodom/layers/bidirectional_3.bin";
|
||||
const char *l1_bin = "../tests/imuodom/layers/bidirectional_4.bin";
|
||||
const char *d0_bin = "../tests/imuodom/layers/dense_3.bin";
|
||||
const char *d1_bin = "../tests/imuodom/layers/dense_4.bin";
|
||||
|
||||
int main() {
|
||||
|
||||
@@ -51,10 +51,14 @@ int main() {
|
||||
tk::dnn::Layer *concat_l[3] = { &x0_2, &x1_2, &x2_2 };
|
||||
tk::dnn::Route concat (&net, concat_l, 3);
|
||||
|
||||
//tk::dnn::LSTM lstm0(&net, 128, true, l0_bin);
|
||||
//tk::dnn::LSTM lstm1(&net, 128, false, l1_bin);
|
||||
//tk::dnn::Dense d0 (&net, 3, d0_bin);
|
||||
tk::dnn::LSTM lstm0(&net, 128, true, l0_bin);
|
||||
tk::dnn::LSTM lstm1(&net, 128, false, l1_bin);
|
||||
|
||||
tk::dnn::Dense d0 (&net, 3, d0_bin);
|
||||
|
||||
tk::dnn::Layer *lstm1_l[1] = { &lstm1 };
|
||||
tk::dnn::Route lstm1_link (&net, lstm1_l, 1);
|
||||
tk::dnn::Dense d1 (&net, 4, d1_bin);
|
||||
net.print();
|
||||
|
||||
dnnType *data;
|
||||
@@ -66,12 +70,12 @@ int main() {
|
||||
TIMER_STOP
|
||||
|
||||
// Print real test
|
||||
//std::cout<<"\n==== CHECK RESULT ====\n";
|
||||
//dnnType *out;
|
||||
//dnnType *out_h;
|
||||
//readBinaryFile(output_bin, dim.tot(), &out_h, &out);
|
||||
//checkResult(dim.tot(), data, out);
|
||||
|
||||
printDeviceVector(100, data);
|
||||
std::cout<<"\n==== CHECK RESULT ====\n";
|
||||
dnnType *out0, *out1;
|
||||
dnnType *out0_h, *out1_h;
|
||||
readBinaryFile(o0_bin, d0.output_dim.tot(), &out0_h, &out0);
|
||||
readBinaryFile(o1_bin, d1.output_dim.tot(), &out1_h, &out1);
|
||||
checkResult(d0.output_dim.tot(), d0.dstData, out0);
|
||||
checkResult(d1.output_dim.tot(), d1.dstData, out1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user