Tensor.FlattenedView<T>
ONE_BY_ONE_SHAPE, SCALAR_SHAPE, SCALAR_STRIDE
Constructor and Description |
---|
GenericTensor(long[] shape,
T value) |
GenericTensor(T scalar) |
GenericTensor(T[] data) |
GenericTensor(T[] data,
long[] shape) |
Modifier and Type | Method and Description |
---|---|
T[] |
asFlatArray() |
double[] |
asFlatDoubleArray() |
int[] |
asFlatIntegerArray() |
static <T> GenericTensor<T> |
create(T[] data,
long[] shape) |
static <T> GenericTensor<T> |
createFilled(T data,
long[] shape) |
GenericTensor<T> |
duplicate() |
BooleanTensor |
elementwiseEquals(T value) |
boolean |
equals(java.lang.Object o) |
Tensor.FlattenedView<T> |
getFlattenedView() |
long |
getLength() |
int |
getRank() |
long[] |
getShape() |
T |
getValue(long... index) |
int |
hashCode() |
boolean |
isShapePlaceholder() |
Tensor<T> |
reshape(long... newShape) |
T |
scalar() |
static <T> GenericTensor<T> |
scalar(T data) |
GenericTensor<T> |
setValue(T value,
long... index) |
Tensor<T> |
slice(int dimension,
long index) |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
asFlatList, create, elementwiseEquals, elementwiseEquals, getValue, hasSameShapeAs, hasSameShapeAs, isLengthOne, isMatrix, isScalar, isVector
public GenericTensor(T[] data, long[] shape)
public GenericTensor(T[] data)
public GenericTensor(T scalar)
public GenericTensor(long[] shape, T value)
public static <T> GenericTensor<T> createFilled(T data, long[] shape)
createFilled
in interface Tensor<T>
public static <T> GenericTensor<T> create(T[] data, long[] shape)
public static <T> GenericTensor<T> scalar(T data)
public boolean isShapePlaceholder()
isShapePlaceholder
in interface Tensor<T>
public GenericTensor<T> setValue(T value, long... index)
public GenericTensor<T> duplicate()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public Tensor.FlattenedView<T> getFlattenedView()
getFlattenedView
in interface Tensor<T>
public BooleanTensor elementwiseEquals(T value)
elementwiseEquals
in interface Tensor<T>
public double[] asFlatDoubleArray()
asFlatDoubleArray
in interface Tensor<T>
public int[] asFlatIntegerArray()
asFlatIntegerArray
in interface Tensor<T>
public T[] asFlatArray()
asFlatArray
in interface Tensor<T>