All Projects → 0b01 → tensorscript

0b01 / tensorscript

Licence: other
shapechecking neural net DSL using Hindley-Milner type system(compiles to pytorch as proof of concept)

Programming Languages

rust
11053 projects
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to tensorscript

ftor
ftor enables ML-like type-directed, functional programming with Javascript including reasonable debugging.
Stars: ✭ 44 (-8.33%)
Mutual labels:  hindley-milner
Write You A Haskell
Building a modern functional compiler from first principles. (http://dev.stephendiehl.com/fun/)
Stars: ✭ 3,064 (+6283.33%)
Mutual labels:  hindley-milner
Ruscall
自作言語処理系のコンパイラ制作
Stars: ✭ 41 (-14.58%)
Mutual labels:  hindley-milner
Typology
Swift type checking and semantic analysis for developer tools
Stars: ✭ 68 (+41.67%)
Mutual labels:  hindley-milner
lambda-dti
Interpreter of the ITGL with dynamic type inference
Stars: ✭ 18 (-62.5%)
Mutual labels:  hindley-milner

TensorScript

Dependently-typed tensor computation.

Features

  • Parametric polymorphism
  • Compile time type checking
  • Dependently typed tensors
  • Multiple targets(Tensorflow, PyTorch, more to come!)
  • Pipes operator

Pipes operator

Pipes operator is a syntax sugar for chained function calls inspired by F#, Elixir and R. For example,

x |> lin1 |> leaky_relu(p=0.2) |> sigmoid

compiles to

x = lin1(x)
x = leaky_relu(x, p=0.2)
x = sigmoid(x)

Development

Build Status

The language is not usable in production or development.

Todo

  1. implement module pattern matching
  2. type level computation (resolved tensor dimension)
  3. BUG: dimension mismatch for mnist example need to create fresh type variables for different static forward functions
  4. BUG: non-determinism
  5. BUG: impl Hash, Eq for Type
  6. set up examples and tests
  7. set up commandline
  8. more examples
  9. better errors in parser
  10. code gen: PyTorch
  11. add more examples
  12. lift dim and tsr to top level
  13. add dim level computation dim1 * dim1
  14. use Linear as L; aliasing
  15. add binary ops (+, -, *, /, %)
  16. add if else expression
  17. add let binding
  18. add more tests
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].