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