提交 0e310c01 authored 作者: Reyhane Askari's avatar Reyhane Askari

removed check for outputGuard

上级 ddc73246
......@@ -10,7 +10,6 @@ import theano
from theano import gof
import theano.gof.vm
from theano.configparser import config
from theano.compile.ops import _output_guard
from six import string_types
from theano.compile.function_module import Supervisor
......
......@@ -397,7 +397,7 @@ def get_scalar_constant_value(orig_v, elemwise=True,
"""Return the constant scalar(0-D) value underlying variable `v`.
If `v` is the output of dimshuffles, fills, allocs, rebroadcasts,
cast, OutputGuard, DeepCopyOp, ScalarFromTensor, ScalarOp, Elemwise
cast, DeepCopyOp, ScalarFromTensor, ScalarOp, Elemwise
and some pattern with Subtensor, this function digs through them.
If `v` is not some view of constant scalar data, then raise a
......@@ -447,7 +447,6 @@ def get_scalar_constant_value(orig_v, elemwise=True,
max_recur > 0):
max_recur -= 1
if isinstance(v.owner.op, (Alloc, DimShuffle, Rebroadcast,
compile.ops.OutputGuard,
compile.DeepCopyOp)):
v = v.owner.inputs[0]
continue
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论