Class InputTensorInfo


  • public class InputTensorInfo
    extends Wrapper
    Information about user's input tensor. By default, it will be initialized to same data (type/shape/etc) as model's input parameter. User application can override particular parameters (like 'element_type') according to application's data and specify appropriate conversions in pre-processing steps
    • Constructor Detail

      • InputTensorInfo

        public InputTensorInfo​(long addr)
    • Method Detail

      • set_element_type

        public InputTensorInfo set_element_type​(ElementType type)
        Set element type for user's input tensor
        Parameters:
        type - Element type for user's input tensor.
        Returns:
        Reference to 'this' to allow chaining with other calls in a builder-like manner
      • set_layout

        public InputTensorInfo set_layout​(Layout layout)
        Set layout for user's input tensor
        Parameters:
        layout - Layout for user's input tensor.
        Returns:
        Reference to 'this' to allow chaining with other calls in a builder-like manner
      • set_spatial_static_shape

        public InputTensorInfo set_spatial_static_shape​(int height,
                                                        int width)
        By default, input image shape is inherited from model input shape. Use this method to specify different width and height of user's input image. In case if input image size is not known, use set_spatial_dynamic_shape() method.
        Parameters:
        height - Set fixed user's input image height.
        width - Set fixed user's input image width.
        Returns:
        Reference to 'this' to allow chaining with other calls in a builder-like manner.
      • set_spatial_dynamic_shape

        public InputTensorInfo set_spatial_dynamic_shape()
        By default, input image shape is inherited from model input shape. This method specifies that user's input image has dynamic spatial dimensions (width and height). This can be useful for adding resize preprocessing from any input image to model's expected dimensions.
        Returns:
        Reference to 'this' to allow chaining with other calls in a builder-like manner.
      • delete

        protected void delete​(long nativeObj)
        Overrides:
        delete in class Wrapper