Giter Club home page Giter Club logo

dvda's People

Contributors

ghorn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

dvda's Issues

make Expr/Tensor/GNode Ord

There are some O[n^2] operations which could be O[log(n)] if Data.Map or Data.IntMap was used, like the use of elem to see if an expression is repeated.

GNode may use Ord for topsort already, so change to sortBy

improve QuickCheck tests

Complicated because it's easy to get NaN or Infinity, or errors related to TInt overflows.

Current tests are on a restricted subset that will hopefully show some errors. That subset should be grown.

Current tests are on scalars only, need to implement tensors.

Need to implement symbolic variables/substitution tests.

"atomic" functions

Capability to specify expressions as "atomic" and generate code once, treat as atomic function like Sin or Multiply. For stuff like rk4 - would generate function that takes in primal and perturbations, outputs primal and perturbations - possible to do this with reverse sensitivities?

better native numerics

Instead of maintaining numeric values with lists use some sort of unboxed array.

It would also be nice to use Repa to apply functions natively, instead of zipWith/map.

It'll be interesting to see if this can be made faster than the c backend

more fun error messages

replace "error" with Dvda.Errror (error) which prints some standard exception with maybe some fun ascii text

Straightforward pure operators

Now that callNative is implemented, it would be great to have simple operators like diff and grad and so on that can be used on your own pure functions to get a derivative. (This will be handy for testing, hint hint :)

greedy hashing

If I do CSE right now, I think some nodes are hashed (many) more times than one. If I want hashing, I should probably use something like data HashedExpr a = HashedExpr (Expr a) Int and hash greedily

simplifications

  • trig: cos(0) = 1, cos(pi) = -1, etc
  • sanity checks: 1/0 = error, log(0) = error, etc
  • logBase a b
    | a == b = 1
    | otherwise = logBase a b
  • a / b
    | b == 0 = error "blah"
    | a == b = 1
    | otherwise = a / b
  • ~= algebraically equal operator (commutative simplifying version of (==))
  • Neg (Neg a) = a
  • cancel out terms e.g. 4/16 --> 1/4

Implement backends

  • code generation / compilation / dynamic linking
    • c or fortran?
    • vanilla blas for tensors?
    • parallelism?
  • runtime backends
    • repa and hmatrix for tensor types
    • DPH or other parallelism strategy
  • profiling code extremely important

better type safety for Symbolic

Give symbolic variables their own data type so that functions with symbolic inputs or outputs don't have to pass (Expr a) with runtime error checking.

It's necessary for the ease of use of DVDA to allow expressions to be created from operations on Symbolic types through functional dependencies.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.