@@ -574,6 +574,44 @@ const quantizeLinearTests = [
574
574
}
575
575
}
576
576
}
577
+ } ,
578
+
579
+ {
580
+ 'name' : 'quantizeLinear int32 1D tensor with float32 scalar scale' ,
581
+ 'graph' : {
582
+ 'inputs' : {
583
+ 'quantizeLinearInput' : {
584
+ 'data' : [ - 22405.495643615723 , 7391418.921366602 ] ,
585
+ 'descriptor' : { shape : [ 2 ] , dataType : 'float32' } ,
586
+ 'constant' : false
587
+ } ,
588
+ 'quantizeLinearScale' : {
589
+ 'data' : [ 1.1202747821807861 , 0.2800687253475189 ] ,
590
+ 'descriptor' : { shape : [ 2 ] , dataType : 'float32' } ,
591
+ 'constant' : true
592
+ } ,
593
+ 'quantizeLinearZeroPoint' : {
594
+ 'data' : [ 32345 , - 2445234 ] ,
595
+ 'descriptor' : { shape : [ 2 ] , dataType : 'int32' } ,
596
+ 'constant' : true
597
+ }
598
+ } ,
599
+ 'operators' : [ {
600
+ 'name' : 'quantizeLinear' ,
601
+ 'arguments' : [
602
+ { 'input' : 'quantizeLinearInput' } ,
603
+ { 'scale' : 'quantizeLinearScale' } ,
604
+ { 'zeroPoint' : 'quantizeLinearZeroPoint' }
605
+ ] ,
606
+ 'outputs' : 'quantizeLinearOutput'
607
+ } ] ,
608
+ 'expectedOutputs' : {
609
+ 'quantizeLinearOutput' : {
610
+ 'data' : [ 12345 , 23946213 ] ,
611
+ 'descriptor' : { shape : [ 2 ] , dataType : 'int32' }
612
+ }
613
+ }
614
+ }
577
615
}
578
616
] ;
579
617
0 commit comments