提交 1da748da authored 作者: Mohammad Pezeshki's avatar Mohammad Pezeshki

remove duplicate Ins

上级 f85c104d
...@@ -67,7 +67,7 @@ from theano.compile import ( ...@@ -67,7 +67,7 @@ from theano.compile import (
predefined_modes, predefined_linkers, predefined_optimizers, predefined_modes, predefined_linkers, predefined_optimizers,
FunctionMaker, function, function_dump, OpFromGraph, FunctionMaker, function, function_dump, OpFromGraph,
ProfileMode, ProfileStats, ProfileMode, ProfileStats,
In, shared, as_op) shared, as_op)
from theano.misc.safe_asarray import _asarray from theano.misc.safe_asarray import _asarray
......
...@@ -22,7 +22,7 @@ from theano.compile.profilemode import ProfileMode ...@@ -22,7 +22,7 @@ from theano.compile.profilemode import ProfileMode
from theano.compile.sharedvalue import (shared, shared_constructor, from theano.compile.sharedvalue import (shared, shared_constructor,
SharedVariable) SharedVariable)
from theano.compile.pfunc import pfunc, In, rebuild_collect_shared from theano.compile.pfunc import pfunc, rebuild_collect_shared
from theano.compile.builders import * from theano.compile.builders import *
......
...@@ -466,16 +466,6 @@ def _pfunc_param_to_in(param, strict=False, allow_downcast=None): ...@@ -466,16 +466,6 @@ def _pfunc_param_to_in(param, strict=False, allow_downcast=None):
raise TypeError('Constants not allowed in param list', param) raise TypeError('Constants not allowed in param list', param)
if isinstance(param, Variable): # N.B. includes SharedVariable if isinstance(param, Variable): # N.B. includes SharedVariable
return In(variable=param, strict=strict, allow_downcast=allow_downcast) return In(variable=param, strict=strict, allow_downcast=allow_downcast)
elif isinstance(param, In):
return In(
variable=param.variable,
name=param.name,
value=param.value,
mutable=param.mutable,
strict=param.strict,
borrow=param.borrow,
allow_downcast=param.allow_downcast,
implicit=param.implicit)
elif isinstance(param, In): elif isinstance(param, In):
return param return param
raise TypeError('Unknown parameter type: %s' % type(param)) raise TypeError('Unknown parameter type: %s' % type(param))
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论