Class TensorInfo

java.lang.Object
com.codename1.ai.inference.TensorInfo

public final class TensorInfo extends Object
Immutable metadata for one model input or output. Shapes may contain a negative dynamic dimension until the input has been resized and tensors reallocated.
  • Constructor Details

    • TensorInfo

      public TensorInfo(String name, TensorType type, int[] shape, int index)
      Creates tensor metadata.
      Parameters:
      name - runtime tensor name, possibly empty
      type - element type
      shape - current tensor dimensions
      index - native model index
  • Method Details

    • getName

      public String getName()
      Returns:
      the runtime tensor name
    • getType

      public TensorType getType()
      Returns:
      the tensor element type
    • getShape

      public int[] getShape()
      Returns:
      a defensive copy of current dimensions
    • getIndex

      public int getIndex()
      Returns:
      the zero-based model input or output index