提交 1526fcbb authored 作者: Tanjay94's avatar Tanjay94

Fixed import syntax.

上级 d15bce99
...@@ -3,11 +3,10 @@ import numpy ...@@ -3,11 +3,10 @@ import numpy
import theano import theano
from theano.tensor import basic from theano.tensor import basic as tensor
from theano.tensor import nlinalg from theano.tensor import nlinalg
from theano import gof, scalar from theano import gof, scalar
tensor = basic
from theano.gradient import DisconnectedType from theano.gradient import DisconnectedType
......
...@@ -13,8 +13,7 @@ from theano.tensor.opt import (register_stabilize, ...@@ -13,8 +13,7 @@ from theano.tensor.opt import (register_stabilize,
from theano.gof import local_optimizer from theano.gof import local_optimizer
from theano.gof.opt import Optimizer from theano.gof.opt import Optimizer
from theano.gradient import DisconnectedType from theano.gradient import DisconnectedType
from theano.tensor import basic from theano.tensor import basic as tensor
tensor = basic
class MatrixPinv(Op): class MatrixPinv(Op):
...@@ -774,18 +773,3 @@ def norm(x,ord): ...@@ -774,18 +773,3 @@ def norm(x,ord):
raise ValueError(0) raise ValueError(0)
elif ndim > 2: elif ndim > 2:
raise NotImplementedError("We don't support norm witn ndim > 2") raise NotImplementedError("We don't support norm witn ndim > 2")
"""
import theano
from theano import tensor as T
from theano import function
from theano.tensor import nlinalg
x = T.matrix()
y = nlinalg.norm(x,1)
"""
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论