提交 5ef25dd6 authored 作者: Iban Harlouchet's avatar Iban Harlouchet

flake8 for tensor/slinalg.py

上级 d0bb9a22
import logging import logging
logger = logging.getLogger(__name__)
import numpy
import warnings import warnings
from six.moves import xrange from six.moves import xrange
from theano.gof import Op, Apply import numpy
from theano.tensor import as_tensor_variable, dot, DimShuffle, Dot
from theano.tensor.blas import Dot22
from theano import tensor
import theano.tensor
from theano.tensor.opt import (register_stabilize,
register_specialize, register_canonicalize)
from theano.gof import local_optimizer
from theano.gof.opt import Optimizer
from theano.gradient import DisconnectedType
try: try:
import scipy.linalg import scipy.linalg
...@@ -24,6 +11,13 @@ except ImportError: ...@@ -24,6 +11,13 @@ except ImportError:
# some ops (e.g. Cholesky, Solve, A_Xinv_b) won't work # some ops (e.g. Cholesky, Solve, A_Xinv_b) won't work
imported_scipy = False imported_scipy = False
from theano import tensor
import theano.tensor
from theano.tensor import as_tensor_variable
from theano.gof import Op, Apply
logger = logging.getLogger(__name__)
MATRIX_STRUCTURES = ( MATRIX_STRUCTURES = (
'general', 'general',
'symmetric', 'symmetric',
...@@ -123,7 +117,6 @@ class CholeskyGrad(Op): ...@@ -123,7 +117,6 @@ class CholeskyGrad(Op):
F[k, k] /= (2 * L[k, k]) F[k, k] /= (2 * L[k, k])
else: else:
F = numpy.triu(dz) F = numpy.triu(dz)
M = N - 1
for k in xrange(N - 1, -1, -1): for k in xrange(N - 1, -1, -1):
for j in xrange(k + 1, N): for j in xrange(k + 1, N):
for i in xrange(j, N): for i in xrange(j, N):
......
...@@ -57,7 +57,6 @@ whitelist_flake8 = [ ...@@ -57,7 +57,6 @@ whitelist_flake8 = [
"typed_list/tests/test_type.py", "typed_list/tests/test_type.py",
"typed_list/tests/test_opt.py", "typed_list/tests/test_opt.py",
"typed_list/tests/test_basic.py", "typed_list/tests/test_basic.py",
"tensor/slinalg.py",
"tensor/shared_randomstreams.py", "tensor/shared_randomstreams.py",
"tensor/subtensor.py", "tensor/subtensor.py",
"tensor/elemwise.py", "tensor/elemwise.py",
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论