The error you’re seeing is probably caused by v_s
's type. If it’s a numpy.array
, I think that it is mostly likely of dtype
object, and that’s why theano
ends up raising a TypeError
when you multiply it with beta
. If it’s not a numpy.array
, then maybe theano
does not understand how to make it a shared tensor.
Tensor types sometimes raise errors that are hard to pin down. For example the mentioned in this post was caused because a numpy.array
with dtype=object
was converted to shared.