Skip to content
Merged
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
3 changes: 0 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,6 @@ jobs:
- name: Compile core module
run: sbt "project core" compile

- name: Compile nn module
run: sbt "project nn" compile

- name: Compile examples module
run: sbt "project examples" compile

Expand Down
4 changes: 2 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -837,7 +837,7 @@ val jacFwd = Autodiff.jacFwd(linearMap)

```scala
import dimwit.*
import nn.{GradientDescent, GradientOptimizer}
import dimwit.optimizer.{GradientDescent, GradientOptimizer}
import dimwit.random.Random

trait Feature derives Label
Expand Down Expand Up @@ -884,7 +884,7 @@ val trained = optimizer.iterate(initModelParams)(gradFunc)
### Lion Optimizer

```scala
import nn.Lion
import dimwit.optimizer.Lion

// Lion optimizer with momentum
val lionOptimizer = Lion(learningRate = Tensor0(1e-3f), beta1 = Tensor0(0.9f), beta2 = Tensor0(0.99f), weightDecay = Tensor0(0.0f))
Expand Down
13 changes: 3 additions & 10 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ ThisBuild / resolvers += "Sonatype OSS Snapshots" at "https://oss.sonatype.org/c
addCommandAlias("testAndCoverage", "; clean; coverage; test; coverageReport")

lazy val root = (project in file("."))
.aggregate(core, nn, examples)
.aggregate(core, examples)
.settings(
name := "dimwit-root"
)
Expand Down Expand Up @@ -43,16 +43,9 @@ lazy val core = (project in file("core"))
Compile / packageDoc / publishArtifact := true
)

lazy val nn = (project in file("nn"))
.settings(
name := "dimwit-nn"
)
.dependsOn(core)

// Examples subproject
lazy val examples = (project in file("examples"))
.dependsOn(core)
.dependsOn(nn)
.settings(
name := "dimwit-examples",
// Examples use the same Scala version and dependencies as main project
Expand Down Expand Up @@ -81,7 +74,7 @@ lazy val examples = (project in file("examples"))
// Processes files in /mdocs that need to be copied to the root (e.g. README.md)
lazy val docsRoot = (project in file(".dimwit-docs-root"))
.enablePlugins(MdocPlugin)
.dependsOn(core, nn)
.dependsOn(core)
.settings(
name := "dimwit-docs-root",
mdocIn := (ThisBuild / baseDirectory).value / "mdocs",
Expand All @@ -98,7 +91,7 @@ lazy val docsRoot = (project in file(".dimwit-docs-root"))
// Processes all other docs in /mdocs/docs/ → output to docs/
lazy val docs = (project in file(".dimwit-docs"))
.enablePlugins(MdocPlugin)
.dependsOn(core, nn)
.dependsOn(core)
.settings(
name := "dimwit-docs",
mdocIn := (ThisBuild / baseDirectory).value / "mdocs/docs",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package nn
package dimwit.nn

import dimwit.*
import dimwit.tensor.*
import dimwit.tensor.TensorOps.IsFloating
import dimwit.jax.Jax
import dimwit.python.PyBridge.{liftPyTensor, toPyTensor}

Expand Down
1 change: 1 addition & 0 deletions core/src/main/scala/dimwit/nn/package.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package nn
package dimwit.optimizer

import dimwit.*
import dimwit.autodiff.FloatTree.ops.*
Expand Down
2 changes: 1 addition & 1 deletion docs/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Before we start exploring the features of DimWit, let's look at a simple example
// main imports for basic tensor operations and automatic differentiation
import dimwit.*
import dimwit.Autodiff.grad // TODO replace with cleaner import after PR is merged
import nn.GradientDescent // TODO replace with cleaner import after refactoring
import dimwit.optimizer.GradientDescent // TODO replace with cleaner import after refactoring

// labels for tensor axes
trait Batch derives Label
Expand Down
221 changes: 0 additions & 221 deletions examples/src/main/scala/basic/Autoencoder.scala

This file was deleted.

4 changes: 2 additions & 2 deletions examples/src/main/scala/basic/LogisticRegression.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package examples.basic
import dimwit.*
import dimwit.Conversions.given
import dimwit.autodiff.*
import nn.*
import nn.ActivationFunctions.{sigmoid, relu}
import dimwit.optimizer.GradientDescent
import dimwit.nn.ActivationFunctions.{sigmoid, relu}
import dimwit.random.Random
import dimwit.stats.Normal

Expand Down
Loading
Loading