def _is_symbolic(v):
r"""Return `True` if any of the arguments are symbolic.
See:
https://github.com/Theano/Theano/wiki/Cookbook
"""
symbolic = False
v = list(v)
for _container, _iter in [(v, xrange(len(v)))]:
for _k in _iter:
_v = _container[_k]
if isinstance(_v, theano.gof.Variable):
symbolic = True
return symbolic
评论列表
文章目录