Crate axonml_tensor

Crate axonml_tensor 

Source
Expand description

Axonml Tensor - N-Dimensional Array for Machine Learning

This crate provides the core Tensor type that serves as the foundation for all machine learning operations in Axonml. Tensors are multi-dimensional arrays with support for automatic broadcasting, device placement, and efficient memory sharing through views.

§Key Features

  • N-dimensional tensor with arbitrary shape
  • Automatic broadcasting for operations
  • Efficient views and slicing (zero-copy where possible)
  • Device-agnostic (CPU, CUDA, Vulkan, etc.)
  • Generic over data type (f32, f64, i32, etc.)

§Example

use axonml_tensor::{zeros, ones, Tensor};

// Create tensors using factory functions
let a = zeros::<f32>(&[2, 3]);
let b = ones::<f32>(&[2, 3]);

// Arithmetic operations
let c = a.add(&b).unwrap();
let d = c.mul_scalar(2.0);

// Reductions
let sum = d.sum();
let mean = d.mean();

@version 0.1.0 @author AutomataNexus Development Team

Re-exports§

pub use shape::Shape;
pub use shape::Strides;
pub use tensor::Tensor;
pub use creation::*;

Modules§

creation
Tensor Creation Functions
ops
Tensor Operations - Mathematical and Structural Operations
prelude
Convenient imports for common usage.
shape
Shape and Strides - Tensor Dimension Management
tensor
Tensor - Core N-Dimensional Array Type
view
Views and Slicing - Tensor Indexing Operations

Enums§

DType
Runtime representation of tensor data types.
Device
Represents a compute device where tensors can be allocated and operations executed.
Error
The main error type for Axonml operations.

Type Aliases§

Result
A specialized Result type for Axonml operations.