Correction (independent of testing the theano op), 's' is a simple wrapper 
to the spline function, it is not the sympy wrapper. the sympy wrapper is K 
and can be evaluated as
In [17]: K._imp_(4.0)
Out[17]: array(16.0)

On Thursday, August 22, 2013 5:44:35 PM UTC-4, Guy Parsey wrote:
>
> Hey Matt,
> I am pretty sure that I have tested the theano Op separately from Sympy, 
> but again, I am probably missing something silly.
> After running the test cases, or evaluating 
>   k = TestInterpOp()
>   k.CreateSuite()
> from the SymPy_Theano_KGM_indep.py file, one can run the following lines
>
> In [2]: s,K,Kp = k.SymInterp()
>
> In [3]: op = k.TheanoInterpOp()
>
> In [4]: x = theano.tensor.dvector()
>
> In [5]: f = theano.function([x],op(x))
>
> In [6]: s(4.0)
> Out[6]: array(16.0)
>
> In [7]: f([4.0])
> Out[7]: array([ 16.])
>
> where 's' is the sympy wrapped spline function (undefined function) and 
> 'f' is the theano.function of the theano op created around the spline. 
> Is this what you mean?
> Cheers,
> Guy
>
> On Thursday, August 22, 2013 5:18:49 PM UTC-4, Matthew wrote:
>>
>> Have you tested your interpolation op in isolation from SymPy?
>>
>> A quick glance at the error (quick glance means I can easily be wrong) 
>> leads me to think that this particular issue is localized within the domain 
>> of Theano.  If this is the case then I recommend asking about your spline 
>> op on the thean...@googlegroups.com mailing list.
>>
>>
>> On Thu, Aug 22, 2013 at 3:59 PM, Guy Parsey <guy.p...@gmail.com> wrote:
>>
>>> Hello again everyone,
>>> I thought I understood everything I needed to implement a theano Op 
>>> wrapping a scipy spline function through theanocode, but have been promptly 
>>> proven wrong (and was on a small family vacation). 
>>> Firstly, many thanks for the modifications done to theanocode to allow 
>>> for Piecewise and Undefined functions. I feel as though everything is in 
>>> place for me to solve my problem, but I am still either lacking or 
>>> mis-undertsanding something with regards to mapping a custom theano Op 
>>> through the theanocode.theano_function.
>>>
>>>>
>>> I have created a quick test case to show what I have understood to date 
>>> which in my mind should have all the pieces necessary to function 
>>> correctly. I have made a small git repository on GitHub in order to share 
>>> this example and because I became fed up trying to figure out how to 
>>> publicly share a BitBucket repository (academic license-where I am hosting 
>>> my thesis project-which will be made public once functioning correctly).
>>> https://github.com/gparsey/KGMindep_SympyTheanoOp
>>>
>>> Running:
>>> >>> ipython SymPy_Theano_KGM_indep.py 
>>> Evaluates three test cases: f0) simple arithmetic operation, f1) sympy 
>>> piecewise into theano and f2) sympy undefined function wrapped spline into 
>>> theano using a custom theano Op
>>> Third test case crashes with:
>>> <<<MissingInputError: ('An input of the graph, used to compute 
>>> TheanoInterpWrapOp.theanointerp(y), was not provided and not given a 
>>> value', y)
>>>
>>> I apologize in advance for: the verbosity of the test cases (trying to 
>>> figure out what is happening within theanocode) using loc_theanocode 
>>> (modified sympy.printing.theanocode), the novice nature of my code and 
>>> whether I included correct references to the SymPy community. I am pretty 
>>> sure that I am either missing something crucial or doing something silly. 
>>> Any and all help/comments would be greatly appreciated.
>>> Cheers,
>>> Guy
>>>
>>> -- 
>>> 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+un...@googlegroups.com.
>>> To post to this group, send email to sy...@googlegroups.com.
>>> Visit this group at http://groups.google.com/group/sympy.
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>
>>

-- 
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