Package-level declarations

Types

Link copied to clipboard
interface AVGPOOL2D<T : DType, V> : NetworkDslItem
Link copied to clipboard
class AvgPool2dImpl<T : DType, V>(val executionContext: ExecutionContext, initialKernelSize: Pair<Int, Int>, initialStride: Pair<Int, Int>, initialPadding: Pair<Int, Int>, initialCountIncludePad: Boolean, id: String) : AVGPOOL2D<T, V>
Link copied to clipboard
interface BiasScope<T : DType, V> : TensorCreationScope<T, V>

Scope for bias initialization with implicit shape context.

Link copied to clipboard
class BiasScopeImpl<T : DType, V>(val executionContext: ExecutionContext, val shape: Shape, val dtype: KClass<T>) : BiasScope<T, V>

Implementation of BiasScope for bias initialization.

Link copied to clipboard
Link copied to clipboard
class Conv1dImpl<T : DType, V>(val executionContext: ExecutionContext, initialInChannels: Int, initialOutChannels: Int, initialKernelSize: Int, initialStride: Int, initialPadding: Int, initialDilation: Int, initialGroups: Int, initialBias: Boolean, id: String, kClass: KClass<T>) : CONV1D<T, V>
Link copied to clipboard
Link copied to clipboard
class Conv2dImpl<T : DType, V>(val executionContext: ExecutionContext, initialInChannels: Int, initialOutChannels: Int, initialKernelSize: Pair<Int, Int>, initialStride: Pair<Int, Int>, initialPadding: Pair<Int, Int>, initialDilation: Pair<Int, Int>, initialGroups: Int, initialBias: Boolean, id: String, kClass: KClass<T>) : CONV2D<T, V>
Link copied to clipboard
Link copied to clipboard
class Conv3dImpl<T : DType, V>(val executionContext: ExecutionContext, initialInChannels: Int, initialOutChannels: Int, initialKernelSize: Triple<Int, Int, Int>, initialStride: Triple<Int, Int, Int>, initialPadding: Triple<Int, Int, Int>, initialDilation: Triple<Int, Int, Int>, initialGroups: Int, initialBias: Boolean, id: String, kClass: KClass<T>) : CONV3D<T, V>
Link copied to clipboard
Link copied to clipboard
class DenseImpl<T : DType, V>(val executionContext: ExecutionContext, inputDimension: Int, _outputDimension: Int, id: String, kClass: KClass<T>) : DENSE<T, V>
Link copied to clipboard
interface FLATTEN<T : DType, V> : NetworkDslItem
Link copied to clipboard
class FlattenImpl<T : DType, V>(val executionContext: ExecutionContext, var startDim: Int = 1, var endDim: Int = -1, id: String) : FLATTEN<T, V>
Link copied to clipboard
interface MAXPOOL2D<T : DType, V> : NetworkDslItem
Link copied to clipboard
class MaxPool2dImpl<T : DType, V>(val executionContext: ExecutionContext, initialKernelSize: Pair<Int, Int>, initialStride: Pair<Int, Int>, initialPadding: Pair<Int, Int>, id: String) : MAXPOOL2D<T, V>
Link copied to clipboard
Link copied to clipboard
annotation class NetworkDsl
Link copied to clipboard
interface NetworkDslItem
Link copied to clipboard

Core DSL interface for building neural networks with generic tensor types. This interface provides a fluent API for constructing neural network architectures with support for different data types and precision levels.

Link copied to clipboard
class NeuralNetworkDslImpl<T : DType, V>(val executionContext: ExecutionContext, kClass: KClass<T>) : NeuralNetworkDsl<T, V>
Link copied to clipboard
interface PrecisionResolver<V>
Link copied to clipboard
class StageImpl<T : DType, V>(val executionContext: ExecutionContext, id: String, kClass: KClass<T>) : NeuralNetworkDsl<T, V>
Link copied to clipboard

Experimental DSL for configuring and running training. This is kept internal/experimental to avoid early API lock-in.

Link copied to clipboard
class TrainingRunner<T : DType, V>(val model: Module<T, V>, val loss: Loss, val optimizer: Optimizer)

Runner that holds training components and provides methods to execute training steps.

Link copied to clipboard
Link copied to clipboard
class Upsample2dImpl<T : DType, V>(val executionContext: ExecutionContext, initialScale: Pair<Int, Int>, initialMode: UpsampleMode, initialAlignCorners: Boolean, id: String) : UPSAMPLE2D<T, V>
Link copied to clipboard
Link copied to clipboard

Scope for weights initialization with implicit shape context.

Link copied to clipboard
class WeightsScopeImpl<T : DType, V>(val executionContext: ExecutionContext, val shape: Shape, val dtype: KClass<T>) : WeightsScope<T, V>

Implementation of WeightsScope for weights initialization.

Functions

Link copied to clipboard
fun <T : DType, V> NeuralNetworkDsl<T, V>.elu(alpha: Float = 1.0f, id: String = "")

Adds a elu activation layer to the network.

Link copied to clipboard
fun <T : DType, V> NeuralNetworkDsl<T, V>.gelu(id: String = "")

Adds a gelu activation layer to the network.

Link copied to clipboard
fun <T : DType, V> NeuralNetworkDsl<T, V>.leakyRelu(negativeSlope: Float = 0.01f, id: String = "")

Adds a leakyRelu activation layer to the network.

Link copied to clipboard
fun <T : DType, V> NeuralNetworkDsl<T, V>.relu(id: String = "")

Adds a relu activation layer to the network.

Link copied to clipboard
inline fun <T : DType, V> sequential(content: NeuralNetworkDsl<T, V>.() -> Unit): Module<T, V>

Generic network builder function that creates a neural network with specified data type and value type.

inline fun <T : DType, V> sequential(executionContext: ExecutionContext, content: NeuralNetworkDsl<T, V>.() -> Unit): Module<T, V>

Overload that wires both tensor factory and ops from an ExecutionContext.

Link copied to clipboard
fun <T : DType, V> NeuralNetworkDsl<T, V>.sigmoid(id: String = "")

Adds a sigmoid activation layer to the network.

Link copied to clipboard
fun <T : DType, V> NeuralNetworkDsl<T, V>.silu(id: String = "")

Adds a silu activation layer to the network.

Link copied to clipboard
fun <T : DType, V> training(block: TrainingConfig<T, V>.() -> Unit): TrainingRunner<T, V>

Experimental entry point for the training DSL.