提交 055d6152 authored 作者: AndroidCloud's avatar AndroidCloud

updates

上级 f68ffb17
...@@ -4733,9 +4733,6 @@ class Reshape(Op): ...@@ -4733,9 +4733,6 @@ class Reshape(Op):
return '%s{%s}' % (self.__class__.__name__, self.ndim) return '%s{%s}' % (self.__class__.__name__, self.ndim)
def get_params(self, node):
return int(self.ndim)
def make_node(self, x, shp): def make_node(self, x, shp):
x = as_tensor_variable(x) x = as_tensor_variable(x)
shp_orig = shp shp_orig = shp
...@@ -4874,6 +4871,8 @@ class Reshape(Op): ...@@ -4874,6 +4871,8 @@ class Reshape(Op):
new_ndim = self.ndim new_ndim = self.ndim
sdtype = node.inputs[1].type.dtype_specs()[1] sdtype = node.inputs[1].type.dtype_specs()[1]
fail = sub['fail'] fail = sub['fail']
params = sub['params']
return """ return """
assert (PyArray_NDIM(%(shp)s) == 1); assert (PyArray_NDIM(%(shp)s) == 1);
npy_intp new_dims[%(params)s->ndim]; npy_intp new_dims[%(params)s->ndim];
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论