提交 bacfd4d1 authored 作者: ChienliMa's avatar ChienliMa

Format Change; Modify inproper comment;Change constructor class;Add test for output storage.

上级 931de932
......@@ -595,8 +595,13 @@ 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.
new_storage_map[memo[key]] = storage_map[key]
# copy input storages if it's mutable
......
......@@ -267,7 +267,6 @@ class T_function(unittest.TestCase):
elif key in fgraph_cpy.outputs:
self.assertFalse(storage_is_shared)
# assert storages of SharedVariable without updates are shared
for (input, _1, _2), here, there in zip(ori.indices,
ori.input_storage,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论