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

Correct typo. Add stoarge_map to PerformLinker.make_thunk(). Now it works!

上级 724ba41d
...@@ -602,7 +602,7 @@ class Function(object): ...@@ -602,7 +602,7 @@ class Function(object):
storage_map = self.fn.storage_map storage_map = self.fn.storage_map
for key in storage_map.keys(): for key in storage_map.keys():
if not isinstance(key, theano.tensor.Constant) and \ if not isinstance(key, theano.tensor.Constant) and \
equiv.has_key(key): memo.has_key(key):
new_storage_map[memo[key]] = storage_map[key] new_storage_map[memo[key]] = storage_map[key]
# copy input storages and use new storage_map to link function # copy input storages and use new storage_map to link function
......
...@@ -663,9 +663,10 @@ class LocalLinker(Linker): ...@@ -663,9 +663,10 @@ class LocalLinker(Linker):
""" """
def make_thunk(self, input_storage=None, output_storage=None): def make_thunk(self, input_storage=None, output_storage=None, storage_map=None):
return self.make_all(input_storage=input_storage, return self.make_all(input_storage=input_storage,
output_storage=output_storage)[:3] output_storage=output_storage,
storage_map=storage_map)[:3]
def make_all(self, input_storage, output_storage): def make_all(self, input_storage, output_storage):
# By convention, subclasses of LocalLinker should implement this function! # By convention, subclasses of LocalLinker should implement this function!
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论