File tree 3 files changed +11
-3
lines changed
3 files changed +11
-3
lines changed Original file line number Diff line number Diff line change 113
113
},
114
114
"types" : " dist/src" ,
115
115
"unpkg" : " dist/browser.js" ,
116
- "version" : " 2.0.0-beta.17 "
116
+ "version" : " 2.0.0-beta.18 "
117
117
}
Original file line number Diff line number Diff line change @@ -809,6 +809,8 @@ export class RNNTimeStep extends RNN {
809
809
return result ;
810
810
}
811
811
812
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
813
+ // @ts -expect-error
812
814
formatData ( data : FormattableData [ ] ) : Float32Array [ ] [ ] {
813
815
const dataShape = lookup . dataShape ( data ) . join ( ',' ) ;
814
816
switch ( dataShape ) {
Original file line number Diff line number Diff line change @@ -645,8 +645,14 @@ export class RNN {
645
645
} ;
646
646
}
647
647
648
- addFormat ( ) : void {
649
- throw new Error ( 'not yet implemented' ) ;
648
+ addFormat ( data : Value ) : void { }
649
+
650
+ formatData ( data : Value [ ] ) : number [ ] [ ] {
651
+ const result = [ ] ;
652
+ for ( let i = 0 ; i < data . length ; i ++ ) {
653
+ result . push ( this . options . dataFormatter . formatDataIn ( data [ i ] ) ) ;
654
+ }
655
+ return result ;
650
656
}
651
657
652
658
toJSON ( ) : IRNNJSON {
You can’t perform that action at this time.
0 commit comments