-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17 from Iainmon/detach-semantics
Add scalar-tensor binary operations Improve tensor printing Add computational graph AST display Add GeLU activation function Improve tensor dtype consistency for saving and loading with chai.py Fix broken VGG example and README Add tensor meta definitions when saving tensors from python.
- Loading branch information
Showing
63 changed files
with
760,958 additions
and
158 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
use Tensor; | ||
|
||
use Autograd; | ||
|
||
|
||
var a: tensor(2,real) = tensor.arange(3,3); | ||
|
||
writeln(a); | ||
|
||
|
||
var b: tensor(2,real) = tensor.arange(3,3) * -0.1; | ||
writeln(b); | ||
|
||
var c = a + b + b + b; | ||
|
||
writeln(c); | ||
|
||
var d = c; | ||
|
||
c.eraseHistory(); | ||
|
||
writeln(d.meta.showGraph()); | ||
writeln(c.meta.showGraph()); | ||
|
||
// writeln((a + b + c).meta.showGraph(indent=true)); | ||
|
||
|
||
writeln(b.gelu()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
*.chdata | ||
*.json | ||
# *.json | ||
__pycache__/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../lib/chai.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.