On Thu, Aug 8, 2013 at 1:19 PM, Matthew Rocklin <mrock...@gmail.com> wrote:

> Ok, Just went through this thread again.
>
> It should be simple to translate SymPy.Piecewise to a recursive
> Theano.switch (after translating SymPy.LT to theano.lt, etc.)  I'll get
> on this soon.  Does this sound reasonable to you Fred?
>

It sound reasonable and is the first thing I suggest to try.


> Jason's PR allowing pass through of keyword arguments looks close to me.
>  I suspect that the `on_unused_input=ignore` issue will soon be possible.
>  Question, should this be default?  Are there other defaults that should be
> used?  I'm curious why you both are making functions with unused inputs.
>
> Jason, was Fred's note on directly passing constants useful?  If not why
> not?  It sounds like you should subs your constant symbols for numeric
> values prior to creating the theano graph.
>

I don't know how frequently it would happen that this option is needed. It
was discussed that pylearn2 always pass it. I don't know if he do it or
not, but if the "framework" generate unseless input and that this is
independent of the user, my guess is that this should be the default. But
if this is dependent of the user, I think it should not be the default.


> > SymPy C Codegen and Theano
>
> @Fred, how hard would it be to leverage SymPy's C codegen in Theano?  This
> might be a lot cleaner than wrapping raw SymPy operations and might
> substantially extend Theano's support of scalar expressions.  Do you have a
> performant Bessel function op?  I'll bet SymPy could be made to do this
> quite well.
>
> @Aaron / @Ondrej, if you're reading this thread could you point us to the
> best place to start looking at C codegen in SymPy?  Alternatively can you
> point to an active community member who would be able to do so?
>
>
@Matt, you already did a new Theano op with C code. I think it is the only
"easy" way to wrap other people c code in Theano. If the person already
know this C code AND a little of Python AND NumPy C-API, it isn't very hard
to a new Theano op with C code. Otherwise, doing the first such op ask to
learn a few think and could ask a few days. You already did this, so you
have a good idea of the work it need.

Now the questions is how is done the SymPy code gen? Is just just string
template that is filled with dtype and other stuff? If we can just call one
SymPy function with the information of what we want and it return a string
with the C code it could be relatively easy. The only questions is about
how to handle the variable name to pass the information around. At worst,
we wrap the sympy c code in a c function, then make a small wrapper c code
that take the Theano c variable name and call this function. So not very
hard as Theano provide what is needed.



> > ODE Integration
>
> What are people's thoughts on scipy.integrate.odeint?  Earlier this year I
> was looking at nodepy <https://github.com/ketch/nodepy>, a purely
> mathematical treatment/catalog of time stepping schemes.  It should be easy
> to generate such schemes in Theano using simple abstractions like Butcher
> matrices.  The code I was playing around with was
> https://github.com/mrocklin/tsgen.  The goal was that we could easily
> experiment with and rapidly benchmark different time stepping schemes for
> specific problems.
>

Honestly, I don't know what ode is and I didn't understand most of this
paragraph due to missing knowledge. But I can tell that there isn't any
"butcher" op in Theano. Maybe it could be done with a graph of the existing
op, but I can't tell. At worst, we can make a new Theano op for that.

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy+unsubscr...@googlegroups.com.
To post to this group, send email to sympy@googlegroups.com.
Visit this group at http://groups.google.com/group/sympy.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to