提交 959b61a2 authored 作者: --global's avatar --global

Allow usage of In in new theano functions

上级 cb67df1c
...@@ -280,7 +280,7 @@ def function(inputs, outputs=None, mode=None, updates=None, givens=None, ...@@ -280,7 +280,7 @@ def function(inputs, outputs=None, mode=None, updates=None, givens=None,
(hasattr(i, 'mutable') and i.mutable))): (hasattr(i, 'mutable') and i.mutable))):
check_for_aliased_inputs = True check_for_aliased_inputs = True
if uses_In or uses_tuple: if uses_tuple:
# we must use old semantics in this case. # we must use old semantics in this case.
if profile: if profile:
raise NotImplementedError("profiling not supported in old-style " raise NotImplementedError("profiling not supported in old-style "
......
...@@ -526,6 +526,8 @@ def _pfunc_param_to_in(param, strict=False, allow_downcast=None): ...@@ -526,6 +526,8 @@ def _pfunc_param_to_in(param, strict=False, allow_downcast=None):
borrow=param.borrow, borrow=param.borrow,
allow_downcast=param.allow_downcast, allow_downcast=param.allow_downcast,
implicit=param.implicit) implicit=param.implicit)
elif isinstance(param, In):
return param
raise TypeError('Unknown parameter type: %s' % type(param)) raise TypeError('Unknown parameter type: %s' % type(param))
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论