このRKNN2 V2.5.0プラットフォームリファレンスは、ArmSoM開発者がモデルを選択および適応するのに役立ちます。 すべてのArmSoMボードでのサポートを確立しません。ボードSOC、実際のツールキット2、ランタイム、NPUドライバ、BSPバージョンを確認します。 ソースは、ユニバーサルLinuxカーネルバージョンを指すものではありません。 ArmSoM ハードウェア検証は行いません。
出典:中国と英語のRKNN2サポートオペレータとコントレイント参照V2.5.0、374および384ページそれぞれ。 中国語は中国語版に続いています。英語、ロシア語、ドイツ語は英語版に従います。 プラットフォームの制約は分離されず、 英語PDF自体には中国語I/O図と出力テーブルが含まれており、その実証は編集可能なローカライズされたテーブルで保持されます。 ConvTranpose や元の LSTM/GRU などのソースのスペルが保存されます。これらの式は SDK 実装に修正されません。
出典ページ:CN 332–343;EN 341–353.
オペレータ参照シリーズ
RKNN2 V2.5.0・RK3566/RK3568:基本と進化
RKNN2 V2.5.0・RK3566/RK3568:再発ネットワーク、算術およびプール
RKNN2 V2.5.0・RK3566/RK3568:形状、スライシング、トランスポーズ
RKNN2 V2.5.0・RK3566/RK3568:活性化、正規化、拡張機能
RKNN2 V2.5.0・RK3588:再発ネットワーク、算術およびプール
RKNN2 V2.5.0・RK3588:形状、スライシング、トランスポーズ
RKNN2 V2.5.0・RK3588:アクティベーション、正規化、拡張機能
RKNN2 V2.5.0・RK3562:再発ネットワーク、算術およびプール
RKNN2 V2.5.0・RK3562:形状、スライシング、トランスポーズ
RKNN2 V2.5.0・RK3562:アクティベーション、正規化、拡張機能
RKNN2 V2.5.0・RV1103/RV1106:基本と進化
RKNN2 V2.5.0・RV1103/RV1106:再発ネットワーク、算術およびプール
RKNN2 V2.5.0・RV1103/RV1106:形状、スライシング、トランスポーズ
RKNN2 V2.5.0・RV1103/RV1106:活性化、正規化、拡張機能
RKNN2 V2.5.0・RK3576/RV1126B:基本と進化
RKNN2 V2.5.0・RK3576/RV1126B:再発ネットワーク、算術およびプール
RKNN2 V2.5.0・RK3576/RV1126B:形状、スライシング、トランスポーズ
RKNN2 V2.5.0・RK3576/RV1126B:活性化、正規化、拡張機能
RKNN2 V2.5.0・RK2118:再発ネットワーク、算術およびプール
RKNN2 V2.5.0・RK2118:形状、スライシング、トランスポーズ
RKNN2 V2.5.0・RK2118:アクティベーション、正規化、拡張機能
RKNN2 V2.5.0・RV1103B/RV1106B:基本と進化
RKNN2 V2.5.0・RV1103B/RV1106B:再発ネットワーク、算術およびプール
RKNN2 V2.5.0・RV1103B/RV1106B:形状、スライシング、トランスポーズ**
ソリューション
入力テンソルの負の値をゼロに設定し、正の値を変更しない状態に保つ
導入事例
- 入力:T1
- shape:[batch,channel,height,width]
- Quantization support
- per-layer
- Broadcasting support
- None
出力
- 出力:T1
- shape:[batch,channel,height,width]
- Quantization support
- per-layer
データ型制約
- T1:int8(センサー)
その他のサポート
- マルチコア:未対応
クリップ/ReLU6
入力テンソルの値を範囲[0,6]にクリップします。
導入事例
- 入力:T1
- shape:[batch,channel,height,width]
- Quantization support
- per-layer
- Broadcasting support
- None
出力
- 出力:T1
- shape:[batch,channel,height,width]
- Quantization support
- per-layer
データ型制約
- T1:int8(センサー)
その他のサポート
- マルチコア:未対応
プレル
学習可能なパラメータで入力テンソルの負の値をスケールし、正の値を変更しない
導入事例
- 入力:T1
- shape:[batch,channel,height,width]
- Quantization support
- per-layer/per-channel
- Broadcasting support
- None
出力
- 出力:T1
- shape:[batch,channel,height,width]
- Quantization support
- per-layer/per-channel
属性
- 斜面: PRelu の係数
- Only a single scalar or C-dimension coefficients are supported
データ型制約
- T1:int8(センサー)
その他のサポート
- マルチコア:未対応
リーキーレル
固定比で入力テンソルの負の値をスケールし、正の値を変更しない
導入事例
- 入力:T1
- shape:[batch,channel,height,width]
- Quantization support
- per-layer
- Broadcasting support
- None
出力
- 出力:T1
- shape:[batch,channel,height,width]
- Quantization support
- per-layer
データ型制約
- T1:int8(センサー)
その他のサポート
- マルチコア:未対応
形を変える
入力データやエレメント数を変更することなく、指定した形状のテンソルを返します。
導入事例
- 入力:T1
- shape:[batch,channel,height,width]
- Quantization support
- per-layer
出力
- 出力:T1
- shape:[batch,channel,height,width]
- Quantization support
- per-layer
データ型制約
- T1:int8(センサー)
属性
- 形状:int
- Specifies the shape of the output tensor
その他のサポート
- マルチコア:未対応
サイズ変更
入力テンソルのサイズを変更します。 一般的に、出力のテンソルの各値を、その辺の入力テンソル値(例、サンプリング位置)の重み平均として計算します。
導入事例
- X:T1
- shape:[batch,channel,height,width]
- Quantization support
- per-layer
- roi(任意):T2
- Currently not supported
- スケール(任意):T2
- The array of scale factors along each dimension
- サイズ(任意):T3
- The target size of the output tensor
出力
- Y:T1
- shape:[batch,channel,height,width]
- Quantization support
- per-layer
データ型制約
- T1:int8(センサー)
- T2:フロート(センサー)
- T3:int64(センサー)
属性
- アンチエイリアス: int (デフォルト値 0)
- Currently not supported to set
- 軸:int[]
- Currently not supported to set
- 文字列(デフォルト値 “half_pixel”)
- Currently only half_pixel, pytorch_half_pixel, and align_corners are supported
- cubic_coeff_a: float (デフォルト -0.75)
- Currently not supported to set
- ディレクティブ: int (デフォルト値 0)
- Currently not supported to set
- extrapolation_value: float (デフォルト 0)
- Currently not supported to set
- keep_aspect_ratio_policy: 文字列 (デフォルト値 “stretch”)
- Currently not supported to set
- モード: 文字列 (デフォルト値 “nearest”)
- Currently only nearest and linear are configurable
- close_mode: 文字列 (デフォルト値 “round_prefer_floor”)
- Currently not supported to set Support Note Currently only integer scaling in width/height direction is supported, and the scale factor must be an integer multiple of 2-8. If the input is (1,c,1,1), it can be scaled up to (1,c,h,w)
スライス
数値のスライスと同じルールで、現在のベクトルのスライスを取得します。
導入事例
- 入出力_tensor:T
- shape:[batch,channel,height,width]
- Quantization support
- per-layer
出力
- 出力:T
- shape:[batch,channel,height,width]
- Quantization support
- per-layer
データ型制約
- T:int8(センサー)
属性
- 開始:int(センサー)
- The start position of the split: No limitation
- 終了:int(センサー)
- The end position of the split: No limitation
- axes:int(センサー)
- The axis to split: any axis 0~3 is supported, and multiple axes can be selected simultaneously
- ステップ:int(センサー)
- The step size of the corresponding axis for splitting
- When height*width==1&&channel%subc==0&&starts[1]%subc==0&&ends[1]% when subc==0&&steps[1]<=subc, steps can be other than 1; otherwise, Slice OP can only run on the NPU when steps==[1,1,1,1]
ソフトマックス
この演算子は、指定した入力の正規化指数を計算します。
Softmax(入力、軸)=exp(入力-最大(入力、軸))/Σ_axis exp(入力-最大(入力、軸))
「axis」属性は、Softmax が実行される寸法を示します。 出力テンソルは同じ形状を持ち、対応する入力のSoftmax値が含まれています。
導入事例
- 入力:T1
- shape:[batch,channel,height,width]
- Subject to the transpose specification constraints
- shape:[batch,channel,height,width]
出力
- 出力:T1
- shape:[batch,channel,height,width]
データ型制約
- T1:int8(センサー)
属性
- 軸線:int64
- The axis for softmax: 1,3, i.e., channel and width directions
exSoftmax13
この演算子は、指定した入力の正規化指数を計算します。
exSoftmax13(入力、軸)=exp(入力-最大(入力、軸線))/Σ_axis exp(入力-最大(入力、軸線))
「axis」属性は、Softmax が実行される寸法を示します。 出力テンソルは同じ形状を持ち、対応する入力のSoftmax値が含まれています。
導入事例
- 入力:T1
- shape:[batch,channel,height,width]
- Subject to the transpose specification constraints
- shape:[batch,channel,height,width]
出力
- 出力:T1
- shape:[batch,channel,height,width]
データ型制約
- T1:int8(センサー)
属性
- 軸線:int64
- The axis for softmax: 1,3, i.e., channel and width directions
exSoftmaxMask
- 未対応
スプリット
ベクトルを軸方向に沿ってnum_outputsベクトルに分割します。分割は、各分割ベクトルのサイズを軸に沿って指定します
導入事例
- 入出力_tensor:T
- shape:[batch,channel,height,width]
- Quantization support
- per-layer
出力
- 出力:T
- One or more output vectors, determined by the num_outputs attribute
- shape: determined by the splitting situation
- Quantization support
- per-layer
データ型制約
- T:int8(センサー)
属性
- 軸線:int
- axis∈{0,1,2,3}
- num_outputs:int の一覧
- 分割:int(センサー)
サブサブサブ
- 複数の方向性NumPyスタイルの放送をサポートする、要素指向のバイナリ減算(C=A-B)を実行します
導入事例
- A:T1,T2
- shape:[batch,channel,height,width]
- Quantization support
- per-layer
- Broadcasting support
- [b,c,1,1]
- [scalar]
- B:T1,T2
- shape:[batch,channel,height,width]
- Quantization support
- per-layer
- Broadcasting support
- [b,c,1,1]
- [scalar]
出力
- C:T1
- shape:[batch,channel,height,width]
- Quantization support
- per-layer
データ型制約
- T1:int8(センサー)
- T2:float(constTensor)
タイル
与えられたテンソルをタイルでテンソルを指示します。 これは、Numpyのタイル機能と同じですが、放送なし
導入事例
- 入力:T1
- shape:[batch,channel,height,width]
- Quantization support
- per-layer
- 繰り返し:T2
- shape:[batch,channel,height,width]
出力
- 出力:T1
- shape:[batch,channel,height,width]
- Quantization support
- per-layer
データ型制約
- T1:int8(センサー)、float16(センサー)
- T2:int64(センサー)
トランスポーズ
入力テンソルをトランスポーズ
導入事例
- X:T1
- shape:[n1,c1,h1,w1]
- See Attributes for detailed constraint rules
- Quantization support
- per-layer
- shape:[n1,c1,h1,w1]
出力
- Y:T1,T2
- shape:[n2,c2,h2,w2]
- See Attributes for detailed constraint rules
- Quantization support
- per-layer
- shape:[n2,c2,h2,w2]
属性
- パーマの軸線順:パーマパラメータの制限は次のとおりです。(p=268435456、q=65536)
- perm=[0,1,2,3]
- No limitation
- perm=[0,1,3,2]
- T1:h1%16=0,h1w1<16p,h1w1<2q
- T2:h1%8=0,h1w1<8p,h1w1<2q
- perm=[0,2,3,1]
- T1:c1<8192,h1w1%8=0,w1c1<p*16
- T2:c1<8192,h1w1%8=0,w1c1<p*8
- perm=[0,2,1,3]
- T1:h1%16=0,h1w1<16p,h1w1<2q,c1*w1<p
- T2:h1%8=0,h1w1<8p,h1w1<2q,c1*w1<p
- perm=[0,3,1,2]
- T1,T2:h1w1<p,w1<8192,h1c1<p
- perm=[0,3,2,1]
- T1:h1%16=0,h1w1<16p,h1w1<2q,c1<p*16
- T2:h1%8=0,h1w1<8p,h1w1<2q,c1<p*8
- perm=[1,0,2,3]
- T1:h1w1<16p,n1<8192,h1*w1<p
- T2:h1w1<8p,n1<8192,h1*w1<p
- perm=[1,0,3,2]
- T1:h1%16=0,c1h1w1<16p,h1w1<2*q
- T2:h1%8=0,c1h1w1<8p,h1w1<2*q
- perm=[1,2,0,3]
- T1:n1w1<p16,c1h1w1<p,w1%16=0
- T2:n1w1<p8,c1h1w1p,w1%8=0
- perm=[1,2,3,0]
- T1:h1w1<p,n1<p16,c1h1w1<p16,n1w1<p*16
- T2:h1w1<p,n1<p8,c1h1w1<p8,n1w1<p*8
- perm=[1,3,0,2]
- T1:c1w1<8192,n1h1<p,w1%16=0
- T2:c1w1<8192,n1h1<p,w1%8=0
- perm=[1,3,2,0]
- T1:c1h1w1<p,n1*h1<p,w1<8192,w1%16=0
- T2:c1h1w1<p,n1*h1<p,w1<8192,w1%8=0
- perm=[2,1,0,3]
- T1,T2:c1<8192,c1h1w1<p,n1*w1<p
- perm=[2,1,3,0]
- T1:c1h1w1<p,n1w1<p16,c1<8192,n1*w1%4=0
- T2:c1h1w1<p,n1w1<p8,c1<8192,n1*w1%4=0
- perm=[2,0,3,1]
- T1,T2:c1<8192,c1h1w1<p
- perm=[2,0,1,3]
- T1:n1c1h1w1<p,h1w1%16=0
- T2:n1c1h1w1<p,h1w1%8=0
- perm=[2,3,1,0]
- T1:c1h1w1<p,n1c1<p,h1w1<8192,h1*w1%16=0
- T2:c1h1w1<p,n1c1<p,h1w1<8192,h1*w1%8=0
- perm=[2,3,0,1]
- T1,T2:h1w1<8192,n1c1<p
- perm=[3,0,2,1]
- T1:h1w1<p,n1c1<8192,c1h1<p,n1w1<8192,n1*w1%16=0
- T2:h1w1<p,n1c1<8192,c1h1<p,n1w1<8192,n1*w1%8=0
- perm=[3,0,1,2]
- T1:h1w1<p,n1c1<8192,c1h1<p,n1w1<8192,n1h1w1%16=0
- T2:h1w1<p,n1c1<8192,c1h1<p,n1w1<8192,n1h1w1%8=0
- perm=[3,2,0,1]
- T1,T2:h1w1<p,n1c1<8192,n1c1w1<p
- perm=[3,2,1,0]
- T1:c1h1w1<p,h1w1<8192,2h1w1<q,n1c1<p*16,h1%16=0
- T2:c1h1w1<p,h1w1<8192,2h1w1<q,n1c1<p*8,h1%8=0
- perm=[3,1,0,2]
- T1,T2:h1w1<p,c1w1<8192,n1*h1<p
- perm=[3,1,2,0]
- T1,T2:h1w1<p,n1c1<8192,n1h1<p,n1c1*w1<p
- perm=[0,1,2,3]
データ型制約
- T1:int8(センサー)
- T2:int16(センサー)
その他のサポート
- マルチコア:未対応
