# Class Tensor

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

public final class Tensor extends Object
Named tensor value passed to or returned from an inference session.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Tensor(String name, TensorType type, int[] shape, Object data)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static Tensor`
  `bytes(String name, TensorType type, int[] shape, byte[] data)`
  `static Tensor`
  `floats(String name, int[] shape, float[] data)`
  `Object`
  `getData()`
  `String`
  `getName()`
  `int[]`
  `getShape()`
  `TensorType`
  `getType()`
  `static Tensor`
  `ints(String name, int[] shape, int[] data)`

  ### Methods inherited from class Object

  `clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### Tensor

    public Tensor(String name, TensorType type, int[] shape, Object data)

- ## Method Details

  - ### floats

    public static Tensor floats(String name, int[] shape, float[] data)

  - ### ints

    public static Tensor ints(String name, int[] shape, int[] data)

  - ### bytes

    public static Tensor bytes(String name, TensorType type, int[] shape, byte[] data)

  - ### getName

    public String getName()

  - ### getType

    public TensorType getType()

  - ### getShape

    public int[] getShape()

  - ### getData

    public Object getData()