TensorData

interface TensorData<T : DType, V> : ItemsAccessor<V> (source)

The fundamental data structure for tensor operations in the SKaiNET framework.

TensorData represents the core abstraction for all tensor-like data structures used throughout the neural network computation system. It combines element access capabilities with shape information, providing a unified interface for working with multi-dimensional data arrays.

This interface serves as the foundation for:

  • Neural network weight storage

  • Activation value containers

  • Gradient computation data structures

  • Input/output tensor representations

The generic type parameters allow for flexible data type support while maintaining type safety across different numerical precisions and value representations.

Parameters

T

the data type constraint extending DType, defining the numerical precision

V

the actual value type that will be stored and accessed

Inheritors

Properties

Link copied to clipboard
abstract val shape: Shape

The shape descriptor that defines the dimensionality and size of this tensor data.

Functions

Link copied to clipboard

Copies all tensor data to a FloatArray.

Link copied to clipboard
fun <T : DType, V> TensorData<T, V>.pprint(): String