Skip to content

Commit

Permalink
fix: versioning (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
load1n9 authored Oct 18, 2023
1 parent f93768f commit 0ca1d4f
Show file tree
Hide file tree
Showing 15 changed files with 85 additions and 22 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
### QuickStart

This example shows how to train a neural network to predict the output of the
XOR function our speedy CPU backend written in rust.
XOR function our speedy CPU backend written in [Rust](https://www.rust-lang.org/).

```typescript
import {
Expand Down Expand Up @@ -253,7 +253,7 @@ console.log(`1 xor 1 = ${out4[0]} (should be close to 0)`);
### Documentation

The full documentation for Netsaur can be found
[here](https://deno.land/x/[email protected].7/mod.ts).
[here](https://deno.land/x/[email protected].10/mod.ts).

### License

Expand Down
2 changes: 1 addition & 1 deletion crates/core-gpu/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
edition = "2021"
name = "netsaur-gpu"
version = "0.2.9"
version = "0.2.10"

[lib]
crate-type = ["cdylib"]
Expand Down
2 changes: 1 addition & 1 deletion crates/core/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
edition = "2021"
name = "netsaur"
version = "0.2.9"
version = "0.2.10"

[lib]
crate-type = ["cdylib"]
Expand Down
2 changes: 1 addition & 1 deletion crates/tokenizers/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
edition = "2021"
name = "netsaur-tokenizers"
version = "0.2.9"
version = "0.2.10"

[lib]
crate-type = ["cdylib"]
Expand Down
2 changes: 1 addition & 1 deletion data/deps.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export { CsvParseStream } from "https://deno.land/std@0.198.0/csv/csv_parse_stream.ts";
export { CsvParseStream } from "https://deno.land/std@0.204.0/csv/csv_parse_stream.ts";
59 changes: 59 additions & 0 deletions deno.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions deps.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export { dlopen } from "https://deno.land/x/[email protected].2/mod.ts";
export type { FetchOptions } from "https://deno.land/x/[email protected].2/mod.ts";
export { dlopen } from "https://deno.land/x/[email protected].3/mod.ts";
export type { FetchOptions } from "https://deno.land/x/[email protected].3/mod.ts";
12 changes: 6 additions & 6 deletions examples/visualize.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -70,20 +70,20 @@
}
],
"source": [
"import { tensor1D } from \"https://deno.land/x/[email protected].9/mod.ts\";\n",
"import { Visualizer } from \"https://deno.land/x/[email protected].9/visualizer/mod.ts\";\n",
"import { tensor1D } from \"https://deno.land/x/[email protected].10/mod.ts\";\n",
"import { Visualizer } from \"https://deno.land/x/[email protected].10/visualizer/mod.ts\";\n",
"\n",
"import {\n",
" Cost,\n",
" WASM,\n",
" AUTO,\n",
" DenseLayer,\n",
" Sequential,\n",
" setupBackend,\n",
" SigmoidLayer,\n",
" tensor2D,\n",
"} from \"../mod.ts\";\n",
"} from \"https://deno.land/x/[email protected]/mod.ts\";\n",
" \n",
"await setupBackend(WASM);\n",
"await setupBackend(AUTO);\n",
"\n",
"const net = new Sequential({\n",
" size: [4, 2],\n",
Expand Down Expand Up @@ -112,7 +112,7 @@
" outputs: tensor2D([[0], [1], [1], [0]]),\n",
" },\n",
" ],\n",
" 50000,\n",
" 1000000,\n",
");\n",
" \n",
"const visualizer = new Visualizer(\"XOR Example\");\n",
Expand Down
8 changes: 4 additions & 4 deletions examples/xor.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
}
],
"source": [
"import { setupBackend, CPU } from \"https://deno.land/x/[email protected].9/mod.ts\";\n",
"import { setupBackend, CPU } from \"https://deno.land/x/[email protected].10/mod.ts\";\n",
"await setupBackend(CPU);"
]
},
Expand Down Expand Up @@ -68,7 +68,7 @@
}
],
"source": [
"import { setupBackend, WASM } from \"https://deno.land/x/[email protected].9/mod.ts\";\n",
"import { setupBackend, WASM } from \"https://deno.land/x/[email protected].10/mod.ts\";\n",
"await setupBackend(WASM);"
]
},
Expand All @@ -92,7 +92,7 @@
"metadata": {},
"outputs": [],
"source": [
"import { setupBackend, GPU } from \"https://deno.land/x/[email protected].9/mod.ts\";\n",
"import { setupBackend, GPU } from \"https://deno.land/x/[email protected].10/mod.ts\";\n",
"await setupBackend(GPU);"
]
},
Expand All @@ -109,7 +109,7 @@
"metadata": {},
"outputs": [],
"source": [
"import { Sequential, DenseLayer, SigmoidLayer, Cost, tensor2D, tensor1D } from \"https://deno.land/x/[email protected].9/mod.ts\";\n",
"import { Sequential, DenseLayer, SigmoidLayer, Cost, tensor2D, tensor1D } from \"https://deno.land/x/[email protected].10/mod.ts\";\n",
"const net = new Sequential({\n",
" /**\n",
" * The number of minibatches is set to 4 and the output size is set to 2.\n",
Expand Down
2 changes: 2 additions & 0 deletions mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ export * from "./src/core/tensor/tensor.ts";
export * from "./src/core/api/layers.ts";
export * from "./src/core/api/shape.ts";
export * from "./src/core/api/network.ts";
export * from "./src/core/api/optimizer.ts";
export * from "./src/core/api/scheduler.ts";
export { GPU } from "./src/backends/gpu/mod.ts";

import { CPU } from "./src/backends/cpu/mod.ts";
Expand Down
2 changes: 1 addition & 1 deletion src/backends/cpu/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const options: FetchOptions = {
name: "netsaur",
url: new URL(import.meta.url).protocol !== "file:"
? new URL(
"https://github.com/denosaurs/netsaur/releases/download/0.2.8/",
"https://github.com/denosaurs/netsaur/releases/download/0.2.10/",
import.meta.url,
)
: "./target/release/",
Expand Down
2 changes: 1 addition & 1 deletion src/backends/gpu/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const options: FetchOptions = {
name: "netsaur_gpu",
url: new URL(import.meta.url).protocol !== "file:"
? new URL(
"https://github.com/denosaurs/netsaur/releases/download/0.2.8/",
"https://github.com/denosaurs/netsaur/releases/download/0.2.10/",
import.meta.url,
)
: "./target/release/",
Expand Down
2 changes: 1 addition & 1 deletion src/backends/wasm/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export class WASMInstance {
await instantiate({
url: new URL(import.meta.url).protocol !== "file:"
? new URL(
"https://github.com/denosaurs/netsaur/releases/download/0.2.8/netsaur_bg.wasm",
"https://github.com/denosaurs/netsaur/releases/download/0.2.10/netsaur_bg.wasm",
import.meta.url,
)
: undefined,
Expand Down
2 changes: 1 addition & 1 deletion tokenizers/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export class Tokenizer {
* @param json string
* @returns
*/
static fromJson(json: string) {
static fromJSON(json: string) {
return new Tokenizer(wasm_tokenizer_from_json(json));
}
}
2 changes: 2 additions & 0 deletions web.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,7 @@ export * from "./src/core/tensor/tensor.ts";
export * from "./src/core/api/layers.ts";
export * from "./src/core/api/shape.ts";
export * from "./src/core/api/network.ts";
export * from "./src/core/api/optimizer.ts";
export * from "./src/core/api/scheduler.ts";

export { WASM } from "./src/backends/wasm/mod.ts";

0 comments on commit 0ca1d4f

Please sign in to comment.