deepdive - is a deep learning library implemented in Scala, it uses ND4j for linear algebra.
-
Linear: Linear
-
Convolutional: Convolutional
-
Embedding: Embedding
-
RNN: Vanilla RNN
-
LSTM: LSTM
- SGD: the stochastic gradient descent
- lr: the learning rate, defaults to 0.01
- Momentum:
- lr: the learning rate, defaults to 0.1
- momentum: decay parameter, defaults to 0.9
val dataSet = new DataSet(features, labels)
val batchSize = 2
val loss = SoftMaxLoss
val lr = 1e-3
val model = Sequential()
.add(Linear(3, 3, activation = ReLU))
.add(Linear(3, 3, activation = ReLU))
.add(Linear(3, 10))
.build(loss, Optimizer.SGD(1e-3), batchSize, seed=Some(1))
model.fit(dataSet)