提交 4b96ed56 authored 作者: Frederic Bastien's avatar Frederic Bastien

don't print useless warning.

上级 8fbfaa0a
...@@ -6,6 +6,7 @@ from StringIO import StringIO ...@@ -6,6 +6,7 @@ from StringIO import StringIO
import numpy import numpy
import theano
from theano import gof from theano import gof
from theano.gof import Env, graph, utils, link from theano.gof import Env, graph, utils, link
from theano.gof.link import WrapLinkerMany, raise_with_op from theano.gof.link import WrapLinkerMany, raise_with_op
...@@ -536,6 +537,9 @@ def _check_inputs(node, storage_map, r_vals, dr_vals, active_nodes, clobber_dr_v ...@@ -536,6 +537,9 @@ def _check_inputs(node, storage_map, r_vals, dr_vals, active_nodes, clobber_dr_v
# But this depend on the version of numpy! # But this depend on the version of numpy!
if getattr(out_var,'size',2)==1: if getattr(out_var,'size',2)==1:
continue continue
if isinstance(node.op, theano.compile.mode.OutputGuard):
# This class is not in the final graph.
continue
if not _may_share_memory(out_var, in_var): if not _may_share_memory(out_var, in_var):
#when a subtensor return a tensor of ndim==0, numpy seam to return a copy. #when a subtensor return a tensor of ndim==0, numpy seam to return a copy.
#when have an empty ndarray(happen with output guard) it is not the same. why? #when have an empty ndarray(happen with output guard) it is not the same. why?
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论