Skip to content

Commit

Permalink
[system-a] neurons/relu -- because there will also be neurons/recu
Browse files Browse the repository at this point in the history
  • Loading branch information
xieyuheng committed Jun 6, 2024
1 parent da571f7 commit 7b7feaf
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 9 deletions.
1 change: 0 additions & 1 deletion TODO.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# system-a

[system-a] `neurons/relu` -- because there will also be `neurons/recu`
[system-a] move `denseBlock` to `neurons/relu` -- maybe rename to `reluBlock`
[system-a] move `gradient` to `gradient/`

Expand Down
2 changes: 1 addition & 1 deletion src/system-a/block/denseBlock.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { relu } from "../neurons/relu.js"
import { relu } from "../neurons/relu/index.js"
import type { Tensor } from "../tensor/Tensor.js"
import { randomTensor } from "../tensor/randomTensor.js"
import type { Shape } from "../tensor/shape.js"
Expand Down
2 changes: 1 addition & 1 deletion src/system-a/models/iris/irisModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export function irisTrainParameters(): Array<Tensor> {

gradientDescentAdam
const gradientDescentFn = gradientDescentAdam({
learningRate: 0.06,
learningRate: 0.001,
decayRate: 0.9,
relayFactor: 0.85,
})
Expand Down
1 change: 1 addition & 0 deletions src/system-a/neurons/relu/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from "./relu.js"
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Tensor } from "../tensor/index.js"
import { add, dot, extend2, mul, sum } from "../toys/index.js"
import type { Tensor } from "../../tensor/index.js"
import { add, dot, extend2, mul, sum } from "../../toys/index.js"

const mul21 = extend2(mul, 2, 1)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Tensor } from "../tensor/Tensor.js"
import type { Tensor } from "../../tensor/Tensor.js"
import { relu } from "./relu.js"

type Target = (t: Tensor) => (...ps: Array<Tensor>) => Tensor
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// import assert from "node:assert"
// import { test } from "node:test"
// import { assertTensorAlmostEqual } from "../tensor/assertions.js"
// import { assertTensorAlmostEqual } from "../../tensor/assertions.js"
// import { rectify, relu } from "./relu.js"

// test("rectify", () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Scalar, Tensor } from "../tensor/index.js"
import { extend1, lt, mul } from "../toys/index.js"
import type { Scalar, Tensor } from "../../tensor/index.js"
import { extend1, lt, mul } from "../../toys/index.js"
import { linear } from "./linear.js"

export function rectifyScalar(s: Scalar): Scalar {
Expand Down

0 comments on commit 7b7feaf

Please sign in to comment.