TFLite's solution is acceptable, we don't need to create same thing again.
- We can use several infra-structures and tools from TFLite.
+## Schema Source
+
+nnpackage supports two kinds of models: `tflite` and `circle`
+
+- For tflite, see `schema.fbs` from tensorflow lite `v1.13.1` source.
+
+- For circle, see [`../schema/circle_schema.fbs`](../schema/circle_schema.fbs).
+
## Extensions
`nnpackage` model has some extensions that are different or missing from TFLite.
-### Multiple Layout
+### A. Multiple Layout
`nnpackage` can support multiple layouts.
- accelerate the performance
- reduce the memory usage
-### Unspecified Dimension
+### B. Unspecified Dimension
`nnpackage` represents unspecified dimension with `-1`.
However, we would like to reserve `0` because `0` could be a valid dimension for a certain
operator (e.g. `tflite.slice`).
-## Operator Reference
+### C. Additional operators
-All operators use same semantics of tensorflow lite operators.
-Refer tensorflow lite source code to understand what inputs, outputs and attributes
-are required and how they are interpretered.
+`circle` has additional operators that are not available in `tflite`.
+See operator reference below.
-## Schema Source
+# Operator Reference
-nnpackage supports two kinds of models: `tflite` and `circle`
+## TensorFlow Lite operators
-- For tflite, see `schema.fbs` from tensorflow lite source.
+All operators (except for additional operators) in `tflite` and `circle` use same semantics of tensorflow lite operators.
+Refer tensorflow lite source code (our baseline: `v1.13.1`) to understand what inputs, outputs and attributes are required and how they are interpretered.
-- For circle, see [`../schema/circle_schema.fbs`](../schema/circle_schema.fbs).
+## Additional operators
+
+### instance_norm
+
+Applies instance normalization
+
+y = `gamma` * (x - mean) / sqrt(variance + `epsilon`) + `beta`, where mean and variance are computed per instance per channel.
+
+#### attributes
+
+- `epsilon` : float (default is 1e-05)
+
+The epsilon value is added to variance to avoid division by zero.
+
+- `fused_activation_function` : enumeration for `fused activation function type`.
+
+`fused activation function type` can be `NONE`, `RELU`, `RELU6` and `TANH` to name a few.
+For complete list, see `circle_schema.fbs`.
+
+The epsilon value is added to variance to avoid division by zero.
+
+#### inputs
+
+- `input` : 4-dimensional tensor
+ - Input data tensor; dimensions are determined by `DataFormat`. See `DataFormat` for further information.
+ - If `DataFormat` is `CHANNELS_FIRST`, layout will be (N x C x H x W), where N is the batch size, C is the number of channels, and H and W are the height and the width of the data.
+
+- `gamma` : 1-dimensional tensor of size C
+ - The gamma value is the scale applied to the normalized tensor
+
+- `beta` : 1-dimensional tensor of size C
+ - The beta value is the offset applied to the normalized tensor
+
+#### outputs
+
+- `output` : 4-dimensional tensor
+ - The output tensor is the normalized tensor of the same shape and type of `input`.