public Dense(units as Long, inputSize as Long = -1l, seed as Long = 1l, activation as String = "linear")
Allocates parameters using seeded Glorot uniform initialization. The local generator is deterministic and does not affect global randomness.
| Parameter | Description |
|---|---|
inputSize | Positive input feature count, or -1 to infer it on build/forward. |
units | Positive output feature count. |
seed | Integer in [1, 2147483646]; use distinct seeds for distinct layers. |
activation | linear, relu, sigmoid, tanh or softmax. |
layer = Dense<Float>(3, inputSize=2, seed=42)