Work around the fact that dict are not hashable in python
This request that all object have a sorted order that depend only on the value of the object. This is true for integer/float/string
We do not verify that the objects in the dict have this property.
Also, we transform values that are list into tuple as list are not hashable.
Return a hash from an ndarray
It takes care of the data, shapes, strides and dtype.
Compute the numeric shape of all intermediate variables given input shapes
WARNING : This modifies the fgraph. Not pure.
>>> import theano
>>> x = theano.tensor.matrix('x')
>>> y = x[512:]; y.name = 'y'
>>> fgraph = theano.FunctionGraph([x], [y], clone=False)
>>> shape_of_variables(fgraph, {x: (1024, 1024)})
{y: (512, 1024), x: (1024, 1024)}