//clika-runtime/io.clika.runtime/Module
Module
interface Module
The module-system floor: Module, Linear, Sequential.
val mlp = Sequential(
Linear(w1, b1, activation = ClikaRtGen.ACTIVATION_RELU),
Linear(w2, b2),
)
val y = mlp(x) // x stays valid (non-consuming)
mlp.close() // drops the weight references
Inheritors
| Linear |
| Sequential |
Functions
| Name | Summary |
|---|---|
| forward | [jvm] abstract fun forward(input: Tensor): Tensor Run the module. Non-consuming: input stays valid. |
| invoke | [jvm] open operator fun invoke(input: Tensor): Tensor module(x): the call spelling of forward. |