(setq org-babel-clojure-sync-nrepl-timeout 1000)
1000
(def num-epochs 5)
(training/fit trainer num-epochs mnist-train mnist-test)
Training: 100% |████████████████████████████████████████| Accuracy: 0.74, SoftmaxCrossEntropyLoss: 0.80
Validating: 100% |████████████████████████████████████████|
Training: 100% |████████████████████████████████████████| Accuracy: 0.81, SoftmaxCrossEntropyLoss: 0.57
Validating: 100% |████████████████████████████████████████|
Training: 100% |████████████████████████████████████████| Accuracy: 0.82, SoftmaxCrossEntropyLoss: 0.53
Validating: 100% |████████████████████████████████████████|
Training: 100% |████████████████████████████████████████| Accuracy: 0.83, SoftmaxCrossEntropyLoss: 0.50
Validating: 100% |████████████████████████████████████████|
Training: 100% |████████████████████████████████████████| Accuracy: 0.84, SoftmaxCrossEntropyLoss: 0.49
Validating: 100% |████████████████████████████████████████|
[Finalizer] INFO ai.djl.training.listener.LoggingTrainingListener - forward P50: 0.405 ms, P90: 0.861 ms
[Finalizer] INFO ai.djl.training.listener.LoggingTrainingListener - training-metrics P50: 0.037 ms, P90: 0.051 ms
[Finalizer] INFO ai.djl.training.listener.LoggingTrainingListener - backward P50: 1.054 ms, P90: 1.706 ms
[Finalizer] INFO ai.djl.training.listener.LoggingTrainingListener - step P50: 0.498 ms, P90: 0.753 ms
[Finalizer] INFO ai.djl.training.listener.LoggingTrainingListener - epoch P50: 55.685 s, P90: 63.680 s
[Finalizer] WARN ai.djl.BaseModel - Model: softmax-regression was not closed explicitly.
[nREPL-session-37be5dc0-b384-4058-91e6-e80169eef8ef] INFO ai.djl.training.listener.LoggingTrainingListener - Epoch 1 finished.
[nREPL-session-37be5dc0-b384-4058-91e6-e80169eef8ef] INFO ai.djl.training.listener.LoggingTrainingListener - Train: Accuracy: 0.74, SoftmaxCrossEntropyLoss: 0.80
[nREPL-session-37be5dc0-b384-4058-91e6-e80169eef8ef] INFO ai.djl.training.listener.LoggingTrainingListener - Validate: Accuracy: 0.79, SoftmaxCrossEntropyLoss: 0.63
[nREPL-session-37be5dc0-b384-4058-91e6-e80169eef8ef] INFO ai.djl.training.listener.LoggingTrainingListener - Epoch 2 finished.
[nREPL-session-37be5dc0-b384-4058-91e6-e80169eef8ef] INFO ai.djl.training.listener.LoggingTrainingListener - Train: Accuracy: 0.81, SoftmaxCrossEntropyLoss: 0.57
[nREPL-session-37be5dc0-b384-4058-91e6-e80169eef8ef] INFO ai.djl.training.listener.LoggingTrainingListener - Validate: Accuracy: 0.81, SoftmaxCrossEntropyLoss: 0.57
[nREPL-session-37be5dc0-b384-4058-91e6-e80169eef8ef] INFO ai.djl.training.listener.LoggingTrainingListener - Epoch 3 finished.
[nREPL-session-37be5dc0-b384-4058-91e6-e80169eef8ef] INFO ai.djl.training.listener.LoggingTrainingListener - Train: Accuracy: 0.82, SoftmaxCrossEntropyLoss: 0.53
[nREPL-session-37be5dc0-b384-4058-91e6-e80169eef8ef] INFO ai.djl.training.listener.LoggingTrainingListener - Validate: Accuracy: 0.82, SoftmaxCrossEntropyLoss: 0.54
[nREPL-session-37be5dc0-b384-4058-91e6-e80169eef8ef] INFO ai.djl.training.listener.LoggingTrainingListener - Epoch 4 finished.
[nREPL-session-37be5dc0-b384-4058-91e6-e80169eef8ef] INFO ai.djl.training.listener.LoggingTrainingListener - Train: Accuracy: 0.83, SoftmaxCrossEntropyLoss: 0.50
[nREPL-session-37be5dc0-b384-4058-91e6-e80169eef8ef] INFO ai.djl.training.listener.LoggingTrainingListener - Validate: Accuracy: 0.82, SoftmaxCrossEntropyLoss: 0.53
[nREPL-session-37be5dc0-b384-4058-91e6-e80169eef8ef] INFO ai.djl.training.listener.LoggingTrainingListener - Epoch 5 finished.
[nREPL-session-37be5dc0-b384-4058-91e6-e80169eef8ef] INFO ai.djl.training.listener.LoggingTrainingListener - Train: Accuracy: 0.84, SoftmaxCrossEntropyLoss: 0.49
[nREPL-session-37be5dc0-b384-4058-91e6-e80169eef8ef] INFO ai.djl.training.listener.LoggingTrainingListener - Validate: Accuracy: 0.82, SoftmaxCrossEntropyLoss: 0.51
(training/get-training-result trainer)
:epoch |
10 |
:train-loss |
0.44829798 |
:validate-loss |
0.48035732 |