提交 7029d8c0 authored 作者: Brandon T. Willard's avatar Brandon T. Willard

Apply isort to theano.sandbox sub-package modules

上级 50ec34d6
import warnings
from theano.tensor.nnet.blocksparse import (
SparseBlockGemv,
SparseBlockOuter,
......@@ -9,6 +10,7 @@ from theano.tensor.nnet.blocksparse import (
sparse_block_outer_inplace,
)
__all__ = [
SparseBlockGemv,
SparseBlockOuter,
......
import sys
print(
"DEPRECATION: theano.sandbox.conv no longer provides conv. "
"They have been moved to theano.tensor.nnet.conv",
......
......@@ -4,14 +4,15 @@ Provides Ops for FFT and DCT.
"""
# This module will soon be deprecated.
import warnings
import numpy as np
import numpy.fft
from theano import tensor
from theano.gof import Op, Apply, generic
from theano.gof import Apply, Op, generic
# This module will soon be deprecated.
import warnings
message = (
"The module theano.sandbox.fourier will soon be deprecated."
......
from warnings import warn
from collections.abc import Sequence
from warnings import warn
from theano.gof.graph import Constant
from theano.gof.link import (
Container,
PerformLinker,
map_storage,
gc_helper,
utils,
add_clear_storage,
Container,
gc_helper,
map_storage,
streamline,
utils,
)
from theano.gof.graph import Constant
class JAXLinker(PerformLinker):
"""A `Linker` that JIT-compiles NumPy-based operations using JAX.
......
import theano
from collections.abc import Sequence
from functools import reduce
from functools import singledispatch as dispatch
from functools import update_wrapper
from warnings import warn
import jax
import jax.numpy as jnp
import jax.scipy as jsp
from warnings import warn
from functools import update_wrapper, reduce
from collections.abc import Sequence
from functools import singledispatch as dispatch
import theano
from theano.compile.ops import (
DeepCopyOp,
Rebroadcast,
Shape,
Shape_i,
SpecifyShape,
ViewOp,
)
from theano.gof import FunctionGraph
from theano.ifelse import IfElse
from theano.tensor.subtensor import (
get_idx_list,
Subtensor,
IncSubtensor,
# This is essentially `np.take`
AdvancedSubtensor1,
AdvancedIncSubtensor1,
# Boolean mask indexing and setting
AdvancedSubtensor,
AdvancedIncSubtensor,
)
from theano.scalar.basic import Cast, Clip, Composite, Identity, ScalarOp
from theano.scan_module.scan_op import Scan
from theano.scan_module.scan_utils import scan_args as ScanArgs
from theano.tensor.basic import (
Dot,
ARange,
TensorFromScalar,
ScalarFromTensor,
AllocEmpty,
Alloc,
Reshape,
AllocEmpty,
ARange,
Dot,
Join,
MaxAndArgmax,
Reshape,
ScalarFromTensor,
TensorFromScalar,
)
from theano.scalar.basic import ScalarOp, Composite, Cast, Clip, Identity
from theano.tensor.elemwise import Elemwise, CAReduce, DimShuffle
from theano.compile.ops import (
DeepCopyOp,
Shape,
Shape_i,
SpecifyShape,
Rebroadcast,
ViewOp,
from theano.tensor.elemwise import CAReduce, DimShuffle, Elemwise
from theano.tensor.extra_ops import (
Bartlett,
CumOp,
DiffOp,
FillDiagonal,
FillDiagonalOffset,
RavelMultiIndex,
RepeatOp,
Unique,
UnravelIndex,
)
from theano.tensor.opt import MakeVector
from theano.tensor.nnet.sigm import ScalarSoftplus
from theano.tensor.nlinalg import (
SVD,
AllocDiag,
Det,
Eig,
Eigh,
ExtractDiag,
MatrixInverse,
QRFull,
QRIncomplete,
SVD,
ExtractDiag,
AllocDiag,
)
from theano.tensor.slinalg import (
Cholesky,
Solve,
from theano.tensor.nnet.sigm import ScalarSoftplus
from theano.tensor.opt import MakeVector
from theano.tensor.slinalg import Cholesky, Solve
from theano.tensor.subtensor import ( # This is essentially `np.take`; Boolean mask indexing and setting
AdvancedIncSubtensor,
AdvancedIncSubtensor1,
AdvancedSubtensor,
AdvancedSubtensor1,
IncSubtensor,
Subtensor,
get_idx_list,
)
from theano.tensor.type_other import MakeSlice
from theano.tensor.extra_ops import (
CumOp,
DiffOp,
RepeatOp,
Bartlett,
FillDiagonal,
FillDiagonalOffset,
Unique,
UnravelIndex,
RavelMultiIndex,
)
if theano.config.floatX == "float64":
jax.config.update("jax_enable_x64", True)
......
from theano.tensor.slinalg import cholesky, solve, eigvalsh
from theano.sandbox.linalg.ops import psd, spectral_radius_bound
from theano.tensor.nlinalg import (
matrix_inverse,
diag,
extract_diag,
alloc_diag,
det,
diag,
eig,
eigh,
extract_diag,
matrix_inverse,
trace,
)
from theano.sandbox.linalg.ops import psd, spectral_radius_bound
from theano.tensor.slinalg import cholesky, eigvalsh, solve
import logging
import theano.tensor
from six import integer_types
from theano.gof import Op, Apply
import theano.tensor
from theano import tensor
from theano.gof import Apply, Op, local_optimizer
from theano.gof.opt import Optimizer
from theano.tensor import DimShuffle, Dot
from theano.tensor.blas import Dot22
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.tensor.nlinalg import (
MatrixInverse,
matrix_inverse,
det,
extract_diag,
matrix_inverse,
trace,
det,
)
from theano.tensor.slinalg import Cholesky, cholesky, Solve, solve, imported_scipy
from theano.tensor.opt import (
register_canonicalize,
register_specialize,
register_stabilize,
)
from theano.tensor.slinalg import Cholesky, Solve, cholesky, imported_scipy, solve
logger = logging.getLogger(__name__)
......
import copy
import warnings
import numpy as np
import warnings
import theano
import theano.tensor as tt
from theano import Op, Apply
from theano import Apply, Op
from theano.scalar import as_scalar
......
......@@ -3,6 +3,7 @@ Neighbours was moved into theano.tensor.nnet.neighbours.
This file was created for compatibility.
"""
from theano.tensor.nnet.neighbours import images2neibs, neibs2images, Images2Neibs
from theano.tensor.nnet.neighbours import Images2Neibs, images2neibs, neibs2images
__all__ = ["images2neibs", "neibs2images", "Images2Neibs"]
......@@ -18,23 +18,22 @@ import warnings
import numpy as np
from six import integer_types, string_types
import theano
from theano import Op, Apply, shared, config, Variable
from theano import gradient, function
from theano import Apply, Op, Variable, config, function, gradient, shared, tensor
from theano.compile import optdb
from theano.gof import ParamsType, local_optimizer
from theano.gradient import undefined_grad
from theano import tensor
from theano.scalar import bool as bool_t
from theano.scalar import int32 as int_t
from theano.tensor import (
TensorType,
as_tensor_variable,
get_vector_length,
cast,
get_vector_length,
opt,
scal,
)
from theano.compile import optdb
from theano.gof import local_optimizer, ParamsType
from theano.scalar import bool as bool_t, int32 as int_t
from . import multinomial
......
from theano.tensor.nnet.nnet import softsign # noqa
import sys
print(
"DEPRECATION WARNING: softsign was moved from theano.sandbox.softsign to "
"theano.tensor.nnet.nnet ",
......
import warnings
from theano.tensor.slinalg import solve # noqa
message = (
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论