[Docs] add ncnn ops docs samples (#313)

* add ncnn ops docs samples

* link ops to ncnn.md

* fix ncnn.md grammar

* fix grammar typo
pull/1/head
hanrui1sensetime 2021-12-22 15:50:11 +08:00 committed by GitHub
parent 7bfe1ad886
commit 9e22c75b70
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 46 additions and 0 deletions

View File

@ -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:

View File

@ -1 +1,40 @@
## ncnn Ops
<!-- TOC -->
- [NCNN Ops](#ncnn-ops)
- [Shape](#shape)
- [Description](#description)
- [Parameters](#parameters)
- [Inputs](#inputs)
- [Outputs](#outputs)
- [Type Constraints](#type-constraints)
<!-- TOC -->
### Shape
#### Description
Get the shape of the ncnn blobs.
#### Parameters
Shape has no parameters.
#### Inputs
<dl>
<dt><tt>inputs[0]</tt>: ncnn.Mat</dt>
<dd>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.</dd>
</dl>
#### Outputs
<dl>
<dt><tt>outputs[0]</tt>: T</dt>
<dd>top_blob; 1-D tensor of shape (bottom_blob.dims,), `bottom_blob.dims` is the input blob dimensions.</dd>
</dl>
#### Type Constraints
- ncnn.Mat: Mat(float32)