ActivationDsl
Annotation to mark TensorOps methods for automatic Network DSL generation.
When applied to activation methods in TensorOps, the KSP processor will generate extension functions for NeuralNetworkDsl that provide convenient DSL methods.
Example:
@ActivationDsl
fun <T : DType, V> relu(tensor: Tensor<T, V>): Tensor<T, V>Content copied to clipboard
This will generate:
fun <T : DType, V> NeuralNetworkDsl<T, V>.relu(id: String = "") {
activation(id) { it.relu() }
}Content copied to clipboard
Parameters
dslName
Optional custom name for the DSL method (defaults to the method name)