Browse Source

Update tflite-schema.js

Lutz Roeder 6 years ago
parent
commit
e122c3f96d
2 changed files with 9 additions and 2 deletions
  1. 4 2
      src/tflite-schema.js
  2. 5 0
      src/tflite.js

+ 4 - 2
src/tflite-schema.js

@@ -19,7 +19,8 @@ TFLITE.TensorType = {
   BOOL: 6,
   INT16: 7,
   COMPLEX64: 8,
-  INT8: 9
+  INT8: 9,
+  FLOAT64: 10
 };
 
 /**
@@ -35,7 +36,8 @@ TFLITE.TensorTypeName = {
   '6': 'BOOL',
   '7': 'INT16',
   '8': 'COMPLEX64',
-  '9': 'INT8'
+  '9': 'INT8',
+  '10': 'FLOAT64'
 };
 
 /**

+ 5 - 0
src/tflite.js

@@ -603,6 +603,11 @@ tflite.Tensor = class {
                         context.index += 4;
                         context.count++;
                         break;
+                    case 'float64':
+                        results.push(context.data.getFloat64(context.index, true));
+                        context.index += 8;
+                        context.count++;
+                        break;
                     case 'string':
                         results.push(context.data[context.index++]);
                         context.count++;