From 9e22c75b704c6247b8f19f7f4d8db5040e8e9a4d Mon Sep 17 00:00:00 2001 From: hanrui1sensetime <83800577+hanrui1sensetime@users.noreply.github.com> Date: Wed, 22 Dec 2021 15:50:11 +0800 Subject: [PATCH] [Docs] add ncnn ops docs samples (#313) * add ncnn ops docs samples * link ops to ncnn.md * fix ncnn.md grammar * fix grammar typo --- docs/en/backends/ncnn.md | 7 +++++++ docs/en/ops/ncnn.md | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+) diff --git a/docs/en/backends/ncnn.md b/docs/en/backends/ncnn.md index 8e5a4f432..2ae258a88 100644 --- a/docs/en/backends/ncnn.md +++ b/docs/en/backends/ncnn.md @@ -64,6 +64,13 @@ If you haven't installed NCNN in the default path, please add `-Dncnn_DIR` flag - This follows the tutorial on [How to convert model](../tutorials/how_to_convert_model.md). - The converted model has two files: `.param` and `.bin`, as model structure file and weight file respectively. + +### List of supported custom ops + +| Operator | CPU | GPU | MMDeploy Releases | +| :--------------------------------------------------------------------------- | :---: | :---: | :---------------- | +| [Shape](../ops/ncnn.md#shape) | Y | N | master | + ### FAQs 1. When running ncnn models for inference with custom ops, it fails and shows the error message like: diff --git a/docs/en/ops/ncnn.md b/docs/en/ops/ncnn.md index 80083172f..88b9c861e 100644 --- a/docs/en/ops/ncnn.md +++ b/docs/en/ops/ncnn.md @@ -1 +1,40 @@ ## ncnn Ops + + + +- [NCNN Ops](#ncnn-ops) + - [Shape](#shape) + - [Description](#description) + - [Parameters](#parameters) + - [Inputs](#inputs) + - [Outputs](#outputs) + - [Type Constraints](#type-constraints) + + + +### Shape + +#### Description + +Get the shape of the ncnn blobs. + +#### Parameters + +Shape has no parameters. + +#### Inputs + +
+
inputs[0]: ncnn.Mat
+
bottom_blob; An ncnn.Mat. If ncnn version >= 1.0.20201208, the dimension of the bottom_blob should be no more than 4, or the dimension of the bottom_blob should be no more than 3.
+
+ +#### Outputs +
+
outputs[0]: T
+
top_blob; 1-D tensor of shape (bottom_blob.dims,), `bottom_blob.dims` is the input blob dimensions.
+
+ +#### Type Constraints + +- ncnn.Mat: Mat(float32)