Skip to content

Commit

Permalink
Update tflite-schema.js
Browse files Browse the repository at this point in the history
  • Loading branch information
lutzroeder committed Sep 14, 2023
1 parent 88336b0 commit 7c32098
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
9 changes: 6 additions & 3 deletions source/tflite-metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@
{ "name": "stride_w", "type": "int32", "default": 0, "description": "stride of the filter window" },
{ "name": "stride_h", "type": "int32", "default": 0, "description": "stride of the filter window" },
{ "name": "dilation_w_factor", "type": "int32", "default": 1 },
{ "name": "dilation_h_factor", "type": "int32", "default": 1 }
{ "name": "dilation_h_factor", "type": "int32", "default": 1 },
{ "name": "quantized_bias_type", "type": "TensorType", "default": "FLOAT32" }
],
"inputs": [
{ "name": "input", "description": "4D tensor" },
Expand Down Expand Up @@ -278,7 +279,8 @@
{ "name": "fused_activation_function", "type": "ActivationFunctionType", "default": "NONE" },
{ "name": "weights_format", "type": "FullyConnectedOptionsWeightsFormat", "default": "DEFAULT" },
{ "name": "keep_num_dims", "type": "boolean", "default": false },
{ "name": "asymmetric_quantize_inputs", "type": "boolean", "default": false }
{ "name": "asymmetric_quantize_inputs", "type": "boolean", "default": false },
{ "name": "quantized_bias_type", "type": "TensorType", "default": "FLOAT32" }
],
"inputs": [
{ "name": "input", "type": "T" },
Expand Down Expand Up @@ -1085,7 +1087,8 @@
{ "name": "padding", "type": "Padding", "default": "SAME" },
{ "name": "stride_w", "type": "int32", "default": 0 },
{ "name": "stride_h", "type": "int32", "default": 0 },
{ "name": "fused_activation_function", "type": "ActivationFunctionType", "default": "NONE" }
{ "name": "fused_activation_function", "type": "ActivationFunctionType", "default": "NONE" },
{ "name": "quantized_bias_type", "type": "TensorType", "default": "FLOAT32" }
],
"inputs": [
{ "name": "output_shape" },
Expand Down
6 changes: 6 additions & 0 deletions source/tflite-schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -1170,6 +1170,7 @@ $root.tflite.Conv2DOptions = class Conv2DOptions {
$.fused_activation_function = reader.int8_(position, 10, 0);
$.dilation_w_factor = reader.int32_(position, 12, 1);
$.dilation_h_factor = reader.int32_(position, 14, 1);
$.quantized_bias_type = reader.int8_(position, 16, 0);
return $;
}

Expand All @@ -1181,6 +1182,7 @@ $root.tflite.Conv2DOptions = class Conv2DOptions {
$.fused_activation_function = $root.tflite.ActivationFunctionType[json.fused_activation_function];
$.dilation_w_factor = reader.value(json.dilation_w_factor, 1);
$.dilation_h_factor = reader.value(json.dilation_h_factor, 1);
$.quantized_bias_type = $root.tflite.TensorType[json.quantized_bias_type];
return $;
}
};
Expand Down Expand Up @@ -1395,6 +1397,7 @@ $root.tflite.FullyConnectedOptions = class FullyConnectedOptions {
$.weights_format = reader.int8_(position, 6, 0);
$.keep_num_dims = reader.bool_(position, 8, false);
$.asymmetric_quantize_inputs = reader.bool_(position, 10, false);
$.quantized_bias_type = reader.int8_(position, 12, 0);
return $;
}

Expand All @@ -1404,6 +1407,7 @@ $root.tflite.FullyConnectedOptions = class FullyConnectedOptions {
$.weights_format = $root.tflite.FullyConnectedOptionsWeightsFormat[json.weights_format];
$.keep_num_dims = reader.value(json.keep_num_dims, false);
$.asymmetric_quantize_inputs = reader.value(json.asymmetric_quantize_inputs, false);
$.quantized_bias_type = $root.tflite.TensorType[json.quantized_bias_type];
return $;
}
};
Expand Down Expand Up @@ -2160,6 +2164,7 @@ $root.tflite.TransposeConvOptions = class TransposeConvOptions {
$.stride_w = reader.int32_(position, 6, 0);
$.stride_h = reader.int32_(position, 8, 0);
$.fused_activation_function = reader.int8_(position, 10, 0);
$.quantized_bias_type = reader.int8_(position, 12, 0);
return $;
}

Expand All @@ -2169,6 +2174,7 @@ $root.tflite.TransposeConvOptions = class TransposeConvOptions {
$.stride_w = reader.value(json.stride_w, 0);
$.stride_h = reader.value(json.stride_h, 0);
$.fused_activation_function = $root.tflite.ActivationFunctionType[json.fused_activation_function];
$.quantized_bias_type = $root.tflite.TensorType[json.quantized_bias_type];
return $;
}
};
Expand Down

0 comments on commit 7c32098

Please sign in to comment.