提交 12711398 authored 作者: Roy Xue's avatar Roy Xue

Update var.py

上级 629aae3d
...@@ -9,6 +9,8 @@ from theano.gof import Constant, Variable ...@@ -9,6 +9,8 @@ from theano.gof import Constant, Variable
from theano.gof.utils import hashtype from theano.gof.utils import hashtype
from theano.tensor.utils import hash_from_ndarray from theano.tensor.utils import hash_from_ndarray
from theano.tensor.type import TensorType from theano.tensor.type import TensorType
from theano.tensor.extra_ops import cumsum
from theano.tensor.extra_ops import cumprod
...@@ -551,12 +553,10 @@ class _tensor_py_operators: ...@@ -551,12 +553,10 @@ class _tensor_py_operators:
return theano.tensor.basic.zeros_like(model, dtype=dtype) return theano.tensor.basic.zeros_like(model, dtype=dtype)
def cumsum(self, axis=None): def cumsum(self, axis=None):
from theano.tensor.extra_ops import cumsum return theano.tensor.extra_ops.cumsum(self, axis)
return cumsum(self, axis)
def cumprod(self, axis=None): def cumprod(self, axis=None):
from theano.tensor.extra_ops import cumprod return theano.tensor.extra_ops.cumprod(self, axis)
return cumprod(self, axis)
class TensorVariable(_tensor_py_operators, Variable): class TensorVariable(_tensor_py_operators, Variable):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论