The execution by Theano should be faster when you work big not too small
inputs size. If you work only on scalar, Theano is probably not faster then
sympy.

But if you work on vector/tensor big enough (this size depend of the
function...) then Theano get faster.

Fred

On Wed, May 20, 2015 at 9:48 AM, <[email protected]> wrote:

> Thank you for your answer.
> So, in what sense theano cooperates with sympy (or the inverse)?
> Since, we can not have the advantage of sympy functions in theano.
> Costas
>
> On Wednesday, May 20, 2015 at 1:41:06 AM UTC+3, [email protected] wrote:
>>
>> Hi,
>>
>> I was experimenting with the following code:
>>
>> import sympy
>> from sympy.abc import x
>> expr = sympy.exp(-x ** 2)
>> from sympy.printing.theanocode import theano_function
>> fn_theano  = theano_function([x], [expr], dims={x: 1}, dtypes={x:
>> 'float64'})
>> print fn_theano([29.]),sympy.exp(-29.**2)
>>
>> I got
>>
>>
>> [ 0.] 5.73245586032578e-366
>>
>>
>> My question is why fn_theano does not  give the same value?
>>
>> Thank you,
>>
>> Costas
>>
>>
>>
>>  --
> 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 [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/sympy.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sympy/3d09a5c6-eaea-4898-83cb-99b8a74f48a7%40googlegroups.com
> <https://groups.google.com/d/msgid/sympy/3d09a5c6-eaea-4898-83cb-99b8a74f48a7%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/CADKKbtizEFmBu6b%2Bsid%3Dx21hfW1TEyeu0eWBEEkBLEG9f9WDsA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to