提交 91c6f9eb authored 作者: ChienliMa's avatar ChienliMa

Add argument ```storage_map``` to the rest of theano linker

上级 bacfd4d1
......@@ -1826,12 +1826,17 @@ class _Linker(gof.link.LocalLinker):
self.no_recycling = no_recycling
return self
<<<<<<< HEAD
def make_all(self, profiler=None, input_storage=None,
output_storage=None, storage_map=None):
# can't import at toplevel because of circular import TODO:
# don't do this ugly hacky way of setting the
# filter_checks_isfinite
from theano.tensor import TensorType # to set filter_check_isfinite
=======
def make_all(self, profiler=None, input_storage=None
, output_storage=None, storage_map=None):
>>>>>>> bf17fa1... Add argument ```storage_map``` to the rest of theano linker
fgraph = self.fgraph
input_storage_ = input_storage
......
......@@ -595,13 +595,7 @@ class Function(object):
# But to be safe for now as it isn't documented and we aren't sure
# it is well tested, we don't share the part of the storage_map.
for key in storage_map.keys():
<<<<<<< HEAD
if key not in self.maker.fgraph.outputs and
not isinstance(key, theano.tensor.Constant):
=======
# output_storages should not be shared
if key not in self.maker.fgraph.outputs and memo.has_key(key):
>>>>>>> 38ae402... Format Change; Modify inproper comment;Change constructor class;Add test for output storage.
if key not in self.maker.fgraph.outputs:
new_storage_map[memo[key]] = storage_map[key]
# copy input storages if it's mutable
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论