I have taken the following code from http://deeplearning.net/software/theano/library/scan.html
import numpy
coefficients = theano.tensor.vector("coefficients")
x = T.scalar("x")
max_coefficients_supported = 10000
# Generate the components of the polynomial
components, updates = theano.scan(fn=lambda coefficient, power, free_variable: coefficient * (free_variable ** power),
outputs_info=None,
sequences=[coefficients, theano.tensor.arange(max_coefficients_supported)],
non_sequences=x)
The code here was meant to explain "sequences" parameter. Here is my question:
How are the sequences fed? The first term "coefficients" is a tensor variable. The second term "theano.tensor.arange(max_coefficients)" is a tensor variable which on using eval() gives a list with [0......999]. The tutorial says-
"The tensor(s) to be looped over should be provided to scan using the sequence keyword argument."
How is the looping happening here based on the arguments provided here in "sequences"?