Documentation Index
Fetch the complete documentation index at: https://mintlify.com/happyme531/ztu_somemodelruntime_ez_rknn_async/llms.txt
Use this file to discover all available pages before exploring further.
NodeArg describes a single input or output tensor of a loaded RKNN model. You obtain NodeArg instances by calling session.get_inputs() or session.get_outputs(). All properties are read-only; the objects are created by the runtime when the session is initialised and reflect the model’s compiled metadata.
Properties
The tensor name from the compiled model. For models where a tensor has no explicit name, the runtime synthesises one using the pattern
"input_N" or "output_N" where N is the zero-based index.The tensor’s dimension sizes as a list of integers, in the order the model was compiled with. A 4-D image input compiled with NCHW layout will have
shape = [batch, channels, height, width].An ONNX-style data type string describing the element type of the tensor. The supported values and their corresponding NumPy dtypes are listed below.
type string | NumPy dtype |
|---|---|
tensor(float) | float32 |
tensor(float16) | float16 |
tensor(int8) | int8 |
tensor(uint8) | uint8 |
tensor(int16) | int16 |
tensor(uint16) | uint16 |
tensor(int32) | int32 |
tensor(uint32) | uint32 |
tensor(int64) | int64 |
tensor(bool) | bool |
Inspecting a model before inference
Reading the input and output descriptors before callingrun helps you allocate correctly-typed arrays and verify that your pre-processing pipeline matches the model’s expectations.
Building an input array from NodeArg
You can use theshape and type properties to allocate a correctly-typed placeholder array programmatically: