Thanks for your reply. I'm afraid I might not have explained myself well.


> Under the hood, it is doing: 
>
> >>> f = theano.function(inputs=[], outputs=E) 
> >>> f() 
>
>
I think that what you are describing here is what is the eval method doing. 
That was not the question, I understand this. To put it simply, my question 
is: how can I myself define a TensorVariable whose eval method takes no 
arguments and returns a value?

For instance, let's say that I want a variable that represents the number 
Pi. In my mind this is no less no more of a constant than the identity 
matrix. So, I should be able to define a variable pi, for which I can call

pi.eval()

and get "3.14..."
 

>
> In that case, you can use the explicit version: 
> >>> f = theano.function(inputs=[x], outputs=x) 
> >>> f(3) 
>
> or the "eval shortcut" 
> >>> x.eval({x: 3}) 
>

This is unsatisfactory as I explained above. When you run x.eval({x : 3}) you 
get array(3.0). In the following line, you could run x.eval({x : 999}) and 
you would obtain array(999.0). This is NOT the behavior I want. The number 
3 is nor permanently assigned to the variable x, the way the identity 
matrix is assigned to E in my original example. I hope this makes my 
question clearer.


> > Also, if someone knows of a reference that answers these basic questions 
> that are not answered in the docs, I would be grateful. 
>
> You can start with 
> http://deeplearning.net/software/theano/tutorial/index.html 
>
>
I have of course read that. And I find that it doesn't answer basic 
questions, such as the one above, about how theano operates. It is just a 
tutorial. I was asking if there were other resourced other than that.

Thanks! Daniel

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"theano-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to