Package-level declarations

Types

Link copied to clipboard
class Dropout<T : DType, V>(val p: Float = 0.5f, var training: Boolean = true, val name: String = "Dropout") : Module<T, V>

Dropout layer that is aware of ExecutionContext phases.

Link copied to clipboard
class Embedding<OutT : DType, V>(val numEmbeddings: Int, val embeddingDim: Int, initWeight: Tensor<OutT, V>, val paddingIdx: Int? = null, val name: String = "Embedding") : DualModule<Int32, OutT, V> , ModuleParameters<OutT, V>

Embedding layer as a DualModule: consumes integer index tensors (Int32) and produces floating outputs (OutT). Supports optional paddingIdx which zeros the corresponding embedding row.

Link copied to clipboard
data class EmbeddingParams(val numEmbeddings: Int, val embeddingDim: Int, val paddingIdx: Int? = null, val maxNorm: Float? = null, val scaleGradByFreq: Boolean = false)

Parameters for configuring an Embedding layer.