SKaiNET
Primary Java entry point for SKaiNET tensor operations.
Provides static factory methods for creating execution contexts, tensors, and performing common operations without requiring Kotlin-specific knowledge.
Example usage from Java:
var ctx = SKaiNET.context();
var a = SKaiNET.tensor(ctx, new int[]{2, 3}, DType.fp32(), new float[]{1,2,3,4,5,6});
var b = SKaiNET.ones(ctx, new int[]{2, 3}, DType.fp32());
var c = TensorJavaOps.add(a, b);Content copied to clipboard
Functions
Link copied to clipboard
Creates a new CPU execution context with default settings (eval mode).
Link copied to clipboard
Creates a tensor filled with ones.
Link copied to clipboard
Creates a tensor filled with random values from a normal distribution.
Link copied to clipboard
Creates a tensor from a float array with the given shape and dtype.
Link copied to clipboard
fun tensorFromInts(ctx: ExecutionContext, shape: IntArray, dtype: DType, data: IntArray): Tensor<*, *>
Creates a tensor from an int array with the given shape and dtype.
Link copied to clipboard
Creates a tensor filled with zeros.