TensorData<T extends TypedData> extension
- on
-
- Tensor<
T>
- Tensor<
Methods
-
copy(
) → Future< Tensor< T> > -
Available on Tensor<
Create a copy of this tensor with the same data and shapeT> , provided by the TensorData extension -
copyElements(
Tensor< T> input, Tensor<T> output, int count) → Future<void> -
Available on Tensor<
Fast GPU-based element copyT> , provided by the TensorData extension -
copyWithPadding(
Tensor< T> input, Tensor<T> output) → Future<void> -
Available on Tensor<
T> , provided by the TensorData extension -
fill(
double value) → Future< void> -
Available on Tensor<
Fill the entire tensor with a single valueT> , provided by the TensorData extension -
getElement(
List< int> indices) → Future<double> -
Available on Tensor<
Returns the value of the tensor element at the givenT> , provided by the TensorData extensionindices. -
padTensorGPU(
List< int> targetShape) → Future<Tensor< T> > -
Available on Tensor<
GPU-based padding implementationT> , provided by the TensorData extension -
padTo(
List< int> targetShape) → Future<Tensor< T> > -
Available on Tensor<
Pad tensor to output shape by adding zerosT> , provided by the TensorData extension -
reshape(
List< int> newShape) → Tensor<T> -
Available on Tensor<
Reshapes the tensor into a new shape without changing the underlying data.T> , provided by the TensorData extension -
reshapeView(
List< int> newShape) → Tensor<T> -
Available on Tensor<
Simplified reshape - just changes the shape view without changing data Only works if total elements match exactlyT> , provided by the TensorData extension -
resize(
List< int> targetShape) → Future<Tensor< T> > -
Available on Tensor<
Simple resize that creates a new tensor with the output shape Copies existing data and fills missing elements with zerosT> , provided by the TensorData extension -
setElement(
List< int> indices, double value) → Future<void> -
Available on Tensor<
Sets the value of the tensor element at the givenT> , provided by the TensorData extensionindicestovalue. -
slice(
{required List< int> startIndices, required List<int> endIndices}) → Future<Tensor< T> > -
Available on Tensor<
Slices the tensor based on multi-dimensional indices.T> , provided by the TensorData extension -
sliceLinear(
{required int start, required int end}) → Future< Tensor< T> > -
Available on Tensor<
Creates a new tensor by slicing the flattened tensor data.T> , provided by the TensorData extensionstartis the starting flat index andendis the ending flat index (exclusive). -
transpose(
{List< int> ? axes}) → Future<Tensor< T> > -
Available on Tensor<
Transposes the tensor according to the givenT> , provided by the TensorData extensionaxespermutation.