kanLayer
inline fun <T : DType, V> NeuralNetworkDsl<T, V>.kanLayer(outputDim: Int, gridSize: Int = 16, degree: Int = 3, useBias: Boolean = true, useResidual: Boolean = false, id: String = "", noinline baseActivation: (Tensor<T, V>) -> Tensor<T, V> = { it }, content: KAN<T, V>.() -> Unit = {})(source)
Adds a KAN layer to the existing network DSL.
Note: The current implementation expands inputs with a learnable basis per feature and mixes them via a linear projection. The degree parameter is reserved for future spline/basis variants and is not yet used.