Skip to content
This repository was archived by the owner on Jul 1, 2023. It is now read-only.

Commit 3c22d78

Browse files
committed
Add RAdam test
1 parent 5bde6f8 commit 3c22d78

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Tests/TensorFlowTests/SequentialTests.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ final class SequentialTests: XCTestCase {
4242
let amsgrad = AMSGrad(for: model, learningRate: 0.02)
4343
let adagrad = AdaGrad(for: model, learningRate: 0.02)
4444
let adadelta = AdaDelta(for: model, learningRate: 0.02)
45+
let radam = RAdam(for: model, learningRate: 0.02)
4546
let x: Tensor<Float> = [[0, 0], [0, 1], [1, 0], [1, 1]]
4647
let y: Tensor<Float> = [0, 1, 1, 0]
4748
Context.local.learningPhase = .training
@@ -58,6 +59,7 @@ final class SequentialTests: XCTestCase {
5859
amsgrad.update(&model, along: 𝛁model)
5960
adagrad.update(&model, along: 𝛁model)
6061
adadelta.update(&model, along: 𝛁model)
62+
radam.update(&model, along: 𝛁model)
6163
}
6264
}
6365
XCTAssertEqual(model.inferring(from: [[0, 0], [0, 1], [1, 0], [1, 1]]),

0 commit comments

Comments
 (0)