Skip to content

Commit 19a82b5

Browse files
minor modifications to kws test files
1 parent 4ce68e5 commit 19a82b5

File tree

2 files changed

+2
-13
lines changed

2 files changed

+2
-13
lines changed

c_reference/tests/kws/test_postcnn.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
#include"postcnn_io.h"
66
#include"conv1d.h"
77
#include"dscnn.h"
8-
#include"conv_utils.h"
98

109
ConvLayers_Params depth_param_2 = {
1110
.W = CNN2_DEPTH_W,
@@ -111,7 +110,7 @@ int main(){
111110
free(cnn4_out);
112111

113112
if(out_T != O_T){
114-
printf("Error Error, Estimatd Output and Actual ouput teim axis mis-match");
113+
printf("Error, Estimatd Output and Actual ouput teim axis mis-match");
115114
return 0;
116115
}
117116

c_reference/tests/kws/test_rnn.c

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
#include"rnn_params.h"
66
#include"fastgrnn.h"
77
#include"utils.h"
8-
// #include"dscnn.h"
9-
// #include"conv_utils.h"
108

119
int main(){
1210

@@ -49,19 +47,11 @@ int main(){
4947
&RNN_params, &buffers, 0, 0);
5048
memcpy(pred + (t * O_F), temp_hiddenstate, O_F*sizeof(float));
5149
}
52-
53-
// fastgrnn_lr(pred, O_F,
54-
// INPUT, I_F, I_T,
55-
// &RNN_params, &buffers, 0, 0);
56-
57-
// Calculate Error(Aggregate Squared and Mean Squared)
50+
free(temp_hiddenstate);
5851
float error = 0, denom = 0;
5952
for(int t = 0 ; t < O_T ; t++){
6053
for(int d = 0 ; d < O_F ; d++){
6154
error += ((pred[t * O_F + d] - OUTPUT[t * O_F + d]) * (pred[t * O_F + d] - OUTPUT[t * O_F + d]));
62-
// printf("%f %f\t", pred[t * O_F + d], OUTPUT[t * O_F + d]);
63-
// error += ((pred[d] - OUTPUT[t * O_F + d]) * (pred[d] - OUTPUT[t * O_F + d]));
64-
// printf("%f %f\n", pred[d], OUTPUT[t * O_F + d]);
6555
denom += OUTPUT[t * O_F + d] * OUTPUT[t * O_F + d];
6656
}
6757
}

0 commit comments

Comments
 (0)