ailiaSetInputShapeND method

int ailiaSetInputShapeND(
  1. Pointer<AILIANetwork> net,
  2. Pointer<UnsignedInt> shape,
  3. int dim
)

~japanese @brief 推論時の入力データの形状を変更します。 @param net ネットワークオブジェクトポインタ @param shape 入力データの各次元の大きさの配列(dim-1, dim-2, ... ,1, 0) @param dim shapeの次元 @return 成功した場合は \ref AILIA_STATUS_SUCCESS 、そうでなければエラーコードを返す。 @details prototxtで定義されている入力形状を変更します。 prototxtに記述されているランクと同じにする必要があります。 なお、重み係数の形状が入力形状に依存しているなどによりエラーが返る場合があります。 このAPIはailiaOpenWeighXXX呼び出し後より利用可能です。

~english @brief Changes the shape of the input data during inference. @param net A network instance pointer @param shape An array of shape that contains size of each axis (dim-1, dim-2, ... ,1, 0) @param dim The size of shape. @return If this function is successful, it returns \ref AILIA_STATUS_SUCCESS , or an error code otherwise. @details This function changes the input shape defined in prototxt. The shape must have the same rank as the one contained in prototxt. Note that an error may be returned if the weights are dependent on the input shapes, among other reasons. This API can be call after call ailiaOpenWeighXXX().

Implementation

int ailiaSetInputShapeND(
  ffi.Pointer<AILIANetwork> net,
  ffi.Pointer<ffi.UnsignedInt> shape,
  int dim,
) {
  return _ailiaSetInputShapeND(
    net,
    shape,
    dim,
  );
}