@Tony-Y thank you again for the answer, but what you give is a static solution while the theano.function() is a dynamic one in the following sense:
we have data and a list of expressions [‘expression_01’, ’ expression_02’, expression_03’, …]
for example:
expression_01 = 2*x
expression_02 = 3^x
expression_03 = 3x^2 - 5
…
and when there is given the following:
x = theano.tensor.dscalar()
list_of_expression = [‘expression_01’]
f = theano.function([x], list_of_expression, …)
f(2)
…array(8.0)
but in another scenario we have:
x = theano.tensor.dscalar()
list_of_expression = [‘expression_01’, ’ expression_02’, expression_03’]
f = theano.function([x], list_of_expression, …)
f(2)
…array(8.0, 9.0, 7.0)
this is how I understand the theano.function(), hence you just adjust the ‘list_of_expression’ according to your needs and theano.function() does the rest for you dynamically, and I hope it is a little bit more clear. for you too.