Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
sunnycase committed Mar 25, 2020
1 parent f8d4aae commit ed91450
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 6 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Download prebuilt binaries from [Release](https://github.com/kendryte/nncase/rel

- [TFLite ops](./docs/tflite_ops.md)
- [Caffe ops](./docs/caffe_ops.md)
- [ONNX ops](./docs/onnx_ops.md)

## Usage
## 使用方法
Expand Down
6 changes: 3 additions & 3 deletions docs/USAGE_EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ OPTIONS
compile
<input file> input file
<output file> output file
-i, --input-format input file format: e.g. tflite, caffe
-i, --input-format input file format: e.g. tflite, caffe, onnx
-o, --output-format output file format: e.g. kmodel, default is kmodel
-t, --target target arch: e.g. cpu, k210, default is k210
--dataset calibration dataset, used in post quantization
Expand Down Expand Up @@ -55,10 +55,10 @@ OPTIONS

`ncc` is the nncase command line tool. It has two commands: `compile` and `infer`.

`compile` command compile your trained models (`.tflite`, `.caffemodel`) to `.kmodel`.
`compile` command compile your trained models (`.tflite`, `.caffemodel`, `.onnx`) to `.kmodel`.
- `<input file>` is your input model path.
- `<output file>` is the output model path.
- `-i, --input-format` option is used to specify the input model format. nncase supports `tflite` and `caffe` input model currently.
- `-i, --input-format` option is used to specify the input model format. nncase supports `tflite`, `caffe` and `onnx` input model currently.
- `-o, --output-format` option is used to sepecify the output model format. You have only one choice: `kmodel` currently.
- `-t, --target` option is used to set your desired target device to run the model. `cpu` is the most general target that almost every platform should support. `k210` is the Kendryte K210 SoC platform. If you set this option to `k210`, this model can only run on K210 or be emulated on your PC.
- `--inference-type` Set to `float` if you want precision, but you need more memory and lost K210 KPU acceleration. Set to `uint8` if you want KPU acceleration and fast speed and you need to provide a quantization calibration dataset to quantize your models later.
Expand Down
6 changes: 3 additions & 3 deletions docs/USAGE_ZH.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ OPTIONS
compile
<input file> input file
<output file> output file
-i, --input-format input file format: e.g. tflite, caffe
-i, --input-format input file format: e.g. tflite, caffe, onnx
-o, --output-format output file format: e.g. kmodel, default is kmodel
-t, --target target arch: e.g. cpu, k210, default is k210
--dataset calibration dataset, used in post quantization
Expand Down Expand Up @@ -55,10 +55,10 @@ OPTIONS

`ncc` 是 nncase 的命令行工具。它有两个命令: `compile``infer`

`compile` 命令将你训练好的模型 (`.tflite`, `.caffemodel`) 编译到 `.kmodel`
`compile` 命令将你训练好的模型 (`.tflite`, `.caffemodel`, `.onnx`) 编译到 `.kmodel`
- `<input file>` 是你输入模型的路径。
- `<output file>` 是输出模型的路径。
- `-i, --input-format` 用来指定输入模型的格式。nncase 现在支持 `tflite``caffe` 输入格式。
- `-i, --input-format` 用来指定输入模型的格式。nncase 现在支持 `tflite``caffe``onnx` 输入格式。
- `-o, --output-format` 用来指定输出模型的格式。你现在只有一个选项:`kmodel`
- `-t, --target` 用来指定你想要你的模型在哪种目标设备上运行。`cpu` 几乎所有平台都支持的通用目标。`k210` 是 Kendryte K210 SoC 平台。如果你指定了 `k210`,这个模型就只能在 K210 运行或在你的 PC 上模拟运行。
- `--inference-type` 如果你需要精度,设置为 `float`,但你需要更多内存并且失去了 K210 KPU 的加速能力。如果你需要 KPU 加速和更快的执行速度,设置为 `uint8`,之后你需要提供量化校准集来量化你的模型。
Expand Down
41 changes: 41 additions & 0 deletions docs/onnx_ops.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
## Supported ONNX ops
## 支持的 ONNX 算子

| Operator | Is Supported |
|-------|------------------ |
| Abs ||
| Add ||
| AveragePool ||
| Ceil ||
| Concat ||
| Constant ||
| Conv ||
| ConvTranspose ||
| Cos ||
| Div ||
| Exp ||
| Floor ||
| LpNormalization ||
| LeakyRelu ||
| Log ||
| MatMul ||
| MaxPool ||
| Max ||
| Min ||
| Mul ||
| Neg ||
| Pad ||
| ReduceMax ||
| ReduceMean ||
| ReduceMin ||
| ReduceSum ||
| Relu ||
| Reshape ||
| Resize ||
| Sin ||
| Slice ||
| Softmax ||
| Sqrt ||
| Squeeze ||
| Sub ||
| Transpose ||

0 comments on commit ed91450

Please sign in to comment.