CMSIS-NN: Corrected bias type for arm_fully_connected_s8

pull/19/head
Christophe Favergeon 6 years ago
parent 74d3e2f71a
commit 5a6f1e2baa

@ -11,7 +11,7 @@ class FullyConnectedBench:public Client::Suite
int repeatNb; int repeatNb;
Client::Pattern<q7_t> input; Client::Pattern<q7_t> input;
Client::Pattern<q7_t> bias; Client::Pattern<q31_t> bias;
Client::Pattern<q7_t> weight; Client::Pattern<q7_t> weight;
Client::LocalPattern<q7_t> output; Client::LocalPattern<q7_t> output;
Client::LocalPattern<q15_t> temp; Client::LocalPattern<q15_t> temp;
@ -19,7 +19,7 @@ class FullyConnectedBench:public Client::Suite
Client::RefPattern<q7_t> ref; Client::RefPattern<q7_t> ref;
q7_t *inp; q7_t *inp;
q7_t *biasp; q31_t *biasp;
q7_t *weightp; q7_t *weightp;
q7_t *outp; q7_t *outp;
q7_t *refp; q7_t *refp;

@ -21,7 +21,7 @@ class FullyConnected:public Client::Suite
int32_t colDim; int32_t colDim;
Client::Pattern<q7_t> input; Client::Pattern<q7_t> input;
Client::Pattern<q7_t> bias; Client::Pattern<q31_t> bias;
Client::Pattern<q7_t> weight; Client::Pattern<q7_t> weight;
Client::LocalPattern<q7_t> output; Client::LocalPattern<q7_t> output;
Client::LocalPattern<q15_t> temp; Client::LocalPattern<q15_t> temp;

@ -1,10 +1,10 @@
B W
4 4
//04 //04
0x04 0x00000004
//08 //08
0x08 0x00000008
//12 //12
0x0c 0x0000000c
//16 //16
0x10 0x00000010

@ -1,10 +1,10 @@
B W
4 4
//01 //01
0x01 0x00000001
//02 //02
0x02 0x00000002
//03 //03
0x03 0x00000003
//-3 //-3
0xfd 0xfffffffd

@ -1,18 +1,18 @@
B W
8 8
//-3 //-3
0xfd 0xfffffffd
//01 //01
0x01 0x00000001
//-2 //-2
0xfe 0xfffffffe
//02 //02
0x02 0x00000002
//01 //01
0x01 0x00000001
//08 //08
0x08 0x00000008
//03 //03
0x03 0x00000003
//02 //02
0x02 0x00000002

@ -1,20 +1,20 @@
B W
9 9
//-3 //-3
0xfd 0xfffffffd
//01 //01
0x01 0x00000001
//-2 //-2
0xfe 0xfffffffe
//02 //02
0x02 0x00000002
//01 //01
0x01 0x00000001
//08 //08
0x08 0x00000008
//03 //03
0x03 0x00000003
//02 //02
0x02 0x00000002
//-4 //-4
0xfc 0xfffffffc

@ -1,8 +1,8 @@
B W
3 3
//00 //00
0x00 0x00000000
//00 //00
0x00 0x00000000
//00 //00
0x00 0x00000000

@ -1,10 +1,10 @@
B W
4 4
//-2 //-2
0xfe 0xfffffffe
//01 //01
0x01 0x00000001
//-1 //-1
0xff 0xffffffff
//03 //03
0x03 0x00000003

@ -1,12 +1,12 @@
B W
5 5
//-2 //-2
0xfe 0xfffffffe
//01 //01
0x01 0x00000001
//-1 //-1
0xff 0xffffffff
//03 //03
0x03 0x00000003
//00 //00
0x00 0x00000000

@ -1,10 +1,10 @@
B W
4 4
//-2 //-2
0xfe 0xfffffffe
//01 //01
0x01 0x00000001
//-1 //-1
0xff 0xffffffff
//00 //00
0x00 0x00000000

@ -26,7 +26,7 @@
,output_mult ,output_mult
,output_shift ,output_shift
,output_offset ,output_offset
,(const int8_t*)biasp ,(const int32_t*)biasp
,(int8_t*)outp ,(int8_t*)outp
,-128 ,-128
,127 ,127

@ -20,7 +20,7 @@ void printPattern(char *s,Client::AnyPattern<q7_t> pat)
{ {
q7_t *inp=input.ptr(); q7_t *inp=input.ptr();
q7_t *biasp=bias.ptr(); q31_t *biasp=bias.ptr();
q7_t *weightp=weight.ptr(); q7_t *weightp=weight.ptr();
q7_t *outp=output.ptr(); q7_t *outp=output.ptr();
q7_t *refp=ref.ptr(); q7_t *refp=ref.ptr();
@ -36,7 +36,7 @@ void printPattern(char *s,Client::AnyPattern<q7_t> pat)
,output_mult ,output_mult
,output_shift ,output_shift
,output_offset ,output_offset
,(const int8_t*)biasp ,(const int32_t*)biasp
,(int8_t*)outp ,(int8_t*)outp
,act_min ,act_min
,act_max ,act_max

Loading…
Cancel
Save