提交 174e54f0 authored 作者: Frederic's avatar Frederic

Fix opt warning in some cases.

上级 d173f8cb
......@@ -10,9 +10,10 @@ http://www-users.cs.umn.edu/~saad/software/SPARSKIT/paper.ps
import sys
import numpy
import theano
from numpy.lib.stride_tricks import as_strided
import scipy.sparse
import theano
from theano import gof, tensor, compile, scalar, config
from theano.gof.python25 import all
from theano.gradient import DisconnectedType
......@@ -20,7 +21,6 @@ from theano.sparse.utils import hash_from_sparse
import theano.tests.unittest_tools as utt
from theano.gradient import grad_not_implemented, grad_undefined
from theano.sparse.type import SparseType, _is_sparse
from numpy.lib.stride_tricks import as_strided
sparse_formats = ['csc', 'csr']
......@@ -689,7 +689,7 @@ class CSM(gof.Op):
# node.inputs[3] is of lenght as we only support sparse matrix.
return [(node.inputs[3][0], node.inputs[3][1])]
else:
return node.fgraph.shape_feature.default_infer_shape(node, shapes)
raise theano.tensor.basic.ShapeError("case not implemented")
CSC = CSM('csc')
......
......@@ -1890,7 +1890,7 @@ class AdvancedSubtensor(Op):
else:
return [ind1shp]
# Default case, we don't know
return node.fgraph.shape_feature.default_infer_shape(node, ishapes)
raise theano.tensor.basic.ShapeError("case not implemented")
def perform(self, node, inputs, out_):
out, = out_
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论