Advertisement
TakesxiSximada

theano plactice

Apr 18th, 2014
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.57 KB | None | 0 0
  1. >>> import numpy
  2. >>> import theano
  3. >>> import theano.tensor as T
  4. >>> x = T.dscalar()
  5. >>> y = T.dscalar()
  6. >>> c = T.dscalar()
  7. >>> ff = theano.function([c], x*2+y, givens=[(x, c*10), (y,5)])
  8. Traceback (most recent call last):
  9.   File "<stdin>", line 1, in <module>
  10.   File "/home/xxx/test/larn/local/lib/python2.7/site-packages/theano/compile/function.py", line 223, in function
  11.     profile=profile)
  12.   File "/home/xxx/test/larn/local/lib/python2.7/site-packages/theano/compile/pfunc.py", line 490, in pfunc
  13.     no_default_updates=no_default_updates)
  14.   File "/home/xxx/test/larn/local/lib/python2.7/site-packages/theano/compile/pfunc.py", line 241, in rebuild_collect_shared
  15.     cloned_v = clone_v_get_shared_updates(outputs, copy_inputs_over)
  16.   File "/home/xxx/test/larn/local/lib/python2.7/site-packages/theano/compile/pfunc.py", line 92, in clone_v_get_shared_updates
  17.     clone_a(v.owner, copy_inputs_over)
  18.   File "/home/xxx/test/larn/local/lib/python2.7/site-packages/theano/compile/pfunc.py", line 135, in clone_a
  19.     strict=rebuild_strict)
  20.   File "/home/xxx/test/larn/local/lib/python2.7/site-packages/theano/gof/graph.py", line 213, in clone_with_new_inputs
  21.     new_inputs[i] = curr.type.filter_variable(new)
  22.   File "/home/xxx/test/larn/local/lib/python2.7/site-packages/theano/tensor/type.py", line 205, in filter_variable
  23.     self=self)
  24. TypeError: Cannot convert Type TensorType(int64, scalar) (of Variable <TensorType(int64, scalar)>) into Type TensorType(float64, scalar). You can try to manually convert <TensorType(int64, scalar)> into a TensorType(float64, scalar).
  25. (common)$
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement