ailiaSetInputShape method

int ailiaSetInputShape(
  1. Pointer<AILIANetwork> net,
  2. Pointer<AILIAShape> shape,
  3. int version
)

Changes the shape of the input data during inference.

Parameters:

  • net: A network instance pointer
  • shape: Shape information for the input data
  • version: AILIA_SHAPE_VERSION

Returns:

If this function is successful, it returns AILIA_STATUS_SUCCESS , or an error code otherwise.

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. The dimension of shape that defined in prototxt is less than 4, the unused element must be set to 1. The dimension of shape that defined in prototxt has 5 or more, please use ailiaSetInputShapeND(). This API can be call after call ailiaOpenWeighXXX()

Implementation

int ailiaSetInputShape(
  ffi.Pointer<AILIANetwork> net,
  ffi.Pointer<AILIAShape> shape,
  int version,
) {
  return _ailiaSetInputShape(
    net,
    shape,
    version,
  );
}