Skip to content

Commit

Permalink
fix iterations
Browse files Browse the repository at this point in the history
  • Loading branch information
dlidstrom committed Dec 8, 2023
1 parent 2f8efdd commit abb95dd
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Kotlin/src/Main.kt
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,9 @@ fun main() {

val lr = 1.0
val ITERS = 4000
for (i in 1..ITERS) {
for (it in trainingData) {
trainer.train(it.first, it.second, lr)
}
for (i in 0..<ITERS) {
val it = trainingData[i % 4]
trainer.train(it.first, it.second, lr)
}

println("Result after ${ITERS} iterations")
Expand Down

0 comments on commit abb95dd

Please sign in to comment.