提交 6824b219 authored 作者: Razvan Pascanu's avatar Razvan Pascanu

add a generic tensorConstructor beside the one provided by the user

上级 d95e876d
...@@ -67,9 +67,10 @@ class Scan(PureOp): ...@@ -67,9 +67,10 @@ class Scan(PureOp):
self.output_types = [] self.output_types = []
idx = 0 idx = 0
jdx = 0 jdx = 0
if typeConstructor is None: tensorConstructor = lambda broadcastable, dtype: TensorType(
typeConstructor = lambda broadcastable, dtype: TensorType(
broadcastable=broadcastable, dtype=dtype) broadcastable=broadcastable, dtype=dtype)
if typeConstructor is None:
typeConstructor = tensorConstructor
while idx < self.n_mit_mot_outs: while idx < self.n_mit_mot_outs:
# Not that for mit_mot there are several output slices per # Not that for mit_mot there are several output slices per
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论