Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix iterations #10

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,4 @@ jobs:
- uses: actions/checkout@v3
- name: Build
working-directory: Kotlin
run: make
run: make && make run
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
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,6 @@ This is the current status of the implementations available. We follow a maturit

> Note! The Python implementation is only here as a reference. If you are using Python you already
> have access to all ai tools and libraries you need.
>
> Note 2! Kotlin seems to be off, not sure why yet.

#### 4.3.1. Sample Output

Expand Down