Komputation is a neural network framework for the JVM written in the Kotlin programming language.
-
Entry points:
-
Standard feed-forward networks:
-
Convolutional neural networks (CNNs):
-
Recurrent neural networks (RNNs):
- Encoder
- Decoder
-
RNN units:
-
Activation functions:
-
Other layers:
-
Boolean functions:
-
Running total:
-
Word embedding toy problem:
-
Addition problem:
-
Reverse function:
-
MNIST:
The following code instantiates a convolutional neural network for sentence classification:
val network = Network(
lookupLayer(embeddings, embeddingDimension, batchSize, maximumLength, optimization),
concatenation(
maximumLength * embeddingDimension,
*filterWidths
.map { filterWidth ->
arrayOf(
convolutionalLayer(numberFilters, filterWidth, filterHeight, initialization, initialization, optimization),
maxPoolingLayer(numberFilters),
reluLayer(numberFilters),
dropoutLayer(numberFilters, random, keepProbability)
)
}
.toTypedArray()
),
projectionLayer(numberFilterWidths * numberFilters, numberCategories, initialization, initialization, optimization),
softmaxLayer(numberCategories)
)
See the TREC demo for more details.
- Stochastic Gradient Descent
- Historical:
- Adaptive: