提交 1dd82d08 authored 作者: Frederic's avatar Frederic

Remove view_map when it is not a view. This remove DebugMode warning about not efficiency.

上级 bc86fe7a
......@@ -679,10 +679,6 @@ class CSM(gof.Op):
a regular grad.
"""
# should view the other inputs too, but viewing multiple inputs is not
view_map = {0: [0]}
#currently supported by the destroyhandler
kmap = None
"""Indexing to speficied what part of the data parameter
should be use to construct the sparse matrix."""
......@@ -701,6 +697,11 @@ class CSM(gof.Op):
self.kmap = kmap
if not isinstance(self.kmap, numpy.ndarray):
# should view the other inputs too, but viewing multiple
# inputs is not currently supported by the destroyhandler
self.view_map = {0: [0]}
self._hashval = (hash(type(self)) ^ hash(self.format) ^
_kmap_hash(self.kmap))
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论