Giter VIP home page Giter VIP logo

liquid's People

Contributors

giucamp avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

liquid's Issues

implement domain propagation

  • Domains
  • Domain Propagation
  • Constant propagation

Domains
A (scalar) range is composed by a lower bound, an upper bound, and two flags specifying whether bounds are inclusive or not.
Invariant: ranges are always canonicalized, that is: lower bound <= upper bound.

A domain is a union of ranges, stored in a vector.
Invariant: domains are always canonicalized, that is ranges are sorted and cannot overlap.

example of domain:
real x where 1 < x <= 2 || 4 <= x < 7
(two separated finite ranges)

real x where -inf <= x < 0 || 0 < x= < inf
(all numbers but 0)

Both Range and Domain should support

  • domain-domain and scalar-domain union (with the operator |)
  • domain-domain and scalar-domain intersection (with the operator &)
  • bound transformation (a functor that is applied to all bounds)
  • explicit cast to bool that returns whether the source is the empty set

Domain Propagation
An expression can have a domain. All the scalars of the expression lie in the domain (in miu6 this is a corollary)

Every operator defines its way to compute a domain based on the domains of operands. For example:

corollary: Domain(x + y where 0 <= x <= 1 && 0 <= y <= 1) == (0 <= x + y <= 2)

the operator Domain returns the domain as bool expression.

Constant propagation
Operators can exploit the range of operands during constant propagation. For example :
x < 0 where x > 6
evaluates to:
false

Operators may trigger a panic whenever the range of an operand includes singularities.
For example:
Log(real x) where x > -1
should panic.

implement tensor to string

Tensor-to-string currently has a stub implmentation.

std::ostream & operator << (std::ostream & i_dest, const Tensor & i_tensor) { i_dest << "to_do"; return i_dest; }

It should output a minimal and canonical representation, that includes comments and tensor names.

Canonicalization can produce unaesthetic syntax tree, for example it transforms a / b to a * Pow(b, -1).

Tensor-to-string should use pattern matching to recognize common sentences, and transform them.

Also NatvisFile.natvis should implement a human friendly string-representation of tenors.

Implement backpropagation

Operators have the capability of computing the gradient of an operand, given the gradient of itself

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.