parameter
Declare a parameter/weight placeholder.
inline fun <T : DType, V> parameter(name: String, noinline builder: SymbolicTensorBuilder<T>.() -> TensorSpec): GraphValue<T>(source)
Parameter helper that reuses a symbolic, allocation-free data DSL to declare shape/dtype.
Example:
val w = parameter<FP32, Float>("w") { shape(4, 4) { ones() } }Content copied to clipboard