提交 393d2e69 authored 作者: Frederic's avatar Frederic

Added comment.

上级 9ba68f7c
......@@ -3351,6 +3351,11 @@ class ConstructSparseFromList(gof.Op):
raise TypeError(
'cannot create a sparse matrix from values with %d ndim' %
values_.type.ndim)
# We only need the shape of `x` in the perform
# If we keep in the graph the x variable as input of the Apply node,
# this can rise the memory usage. That is why the Apply node
# take `x_.shape` as input and not `x`.
return gof.Apply(self, [x_.shape, values_, ilist_],
[csc_matrix(dtype=x.dtype)])
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论