Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
7029d8c0
提交
7029d8c0
authored
10月 21, 2020
作者:
Brandon T. Willard
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Apply isort to theano.sandbox sub-package modules
上级
50ec34d6
隐藏空白字符变更
内嵌
并排
正在显示
12 个修改的文件
包含
89 行增加
和
101 行删除
+89
-101
blocksparse.py
theano/sandbox/blocksparse.py
+2
-0
conv.py
theano/sandbox/conv.py
+1
-0
fourier.py
theano/sandbox/fourier.py
+4
-3
jax_linker.py
theano/sandbox/jax_linker.py
+6
-7
jaxify.py
theano/sandbox/jaxify.py
+46
-58
__init__.py
theano/sandbox/linalg/__init__.py
+5
-5
ops.py
theano/sandbox/linalg/ops.py
+11
-16
multinomial.py
theano/sandbox/multinomial.py
+2
-3
neighbours.py
theano/sandbox/neighbours.py
+2
-1
rng_mrg.py
theano/sandbox/rng_mrg.py
+7
-8
softsign.py
theano/sandbox/softsign.py
+1
-0
solve.py
theano/sandbox/solve.py
+2
-0
没有找到文件。
theano/sandbox/blocksparse.py
浏览文件 @
7029d8c0
import
warnings
import
warnings
from
theano.tensor.nnet.blocksparse
import
(
from
theano.tensor.nnet.blocksparse
import
(
SparseBlockGemv
,
SparseBlockGemv
,
SparseBlockOuter
,
SparseBlockOuter
,
...
@@ -9,6 +10,7 @@ from theano.tensor.nnet.blocksparse import (
...
@@ -9,6 +10,7 @@ from theano.tensor.nnet.blocksparse import (
sparse_block_outer_inplace
,
sparse_block_outer_inplace
,
)
)
__all__
=
[
__all__
=
[
SparseBlockGemv
,
SparseBlockGemv
,
SparseBlockOuter
,
SparseBlockOuter
,
...
...
theano/sandbox/conv.py
浏览文件 @
7029d8c0
import
sys
import
sys
print
(
print
(
"DEPRECATION: theano.sandbox.conv no longer provides conv. "
"DEPRECATION: theano.sandbox.conv no longer provides conv. "
"They have been moved to theano.tensor.nnet.conv"
,
"They have been moved to theano.tensor.nnet.conv"
,
...
...
theano/sandbox/fourier.py
浏览文件 @
7029d8c0
...
@@ -4,14 +4,15 @@ Provides Ops for FFT and DCT.
...
@@ -4,14 +4,15 @@ Provides Ops for FFT and DCT.
"""
"""
# This module will soon be deprecated.
import
warnings
import
numpy
as
np
import
numpy
as
np
import
numpy.fft
import
numpy.fft
from
theano
import
tensor
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
=
(
message
=
(
"The module theano.sandbox.fourier will soon be deprecated."
"The module theano.sandbox.fourier will soon be deprecated."
...
...
theano/sandbox/jax_linker.py
浏览文件 @
7029d8c0
from
warnings
import
warn
from
collections.abc
import
Sequence
from
collections.abc
import
Sequence
from
warnings
import
warn
from
theano.gof.graph
import
Constant
from
theano.gof.link
import
(
from
theano.gof.link
import
(
Container
,
PerformLinker
,
PerformLinker
,
map_storage
,
gc_helper
,
utils
,
add_clear_storage
,
add_clear_storage
,
Container
,
gc_helper
,
map_storage
,
streamline
,
streamline
,
utils
,
)
)
from
theano.gof.graph
import
Constant
class
JAXLinker
(
PerformLinker
):
class
JAXLinker
(
PerformLinker
):
"""A `Linker` that JIT-compiles NumPy-based operations using JAX.
"""A `Linker` that JIT-compiles NumPy-based operations using JAX.
...
...
theano/sandbox/jaxify.py
浏览文件 @
7029d8c0
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
import
jax.numpy
as
jnp
import
jax.numpy
as
jnp
import
jax.scipy
as
jsp
import
jax.scipy
as
jsp
from
warnings
import
warn
import
theano
from
functools
import
update_wrapper
,
reduce
from
theano.compile.ops
import
(
from
collections.abc
import
Sequence
DeepCopyOp
,
Rebroadcast
,
from
functools
import
singledispatch
as
dispatch
Shape
,
Shape_i
,
SpecifyShape
,
ViewOp
,
)
from
theano.gof
import
FunctionGraph
from
theano.gof
import
FunctionGraph
from
theano.ifelse
import
IfElse
from
theano.ifelse
import
IfElse
from
theano.tensor.subtensor
import
(
from
theano.scalar.basic
import
Cast
,
Clip
,
Composite
,
Identity
,
ScalarOp
get_idx_list
,
Subtensor
,
IncSubtensor
,
# This is essentially `np.take`
AdvancedSubtensor1
,
AdvancedIncSubtensor1
,
# Boolean mask indexing and setting
AdvancedSubtensor
,
AdvancedIncSubtensor
,
)
from
theano.scan_module.scan_op
import
Scan
from
theano.scan_module.scan_op
import
Scan
from
theano.scan_module.scan_utils
import
scan_args
as
ScanArgs
from
theano.scan_module.scan_utils
import
scan_args
as
ScanArgs
from
theano.tensor.basic
import
(
from
theano.tensor.basic
import
(
Dot
,
ARange
,
TensorFromScalar
,
ScalarFromTensor
,
AllocEmpty
,
Alloc
,
Alloc
,
Reshape
,
AllocEmpty
,
ARange
,
Dot
,
Join
,
Join
,
MaxAndArgmax
,
MaxAndArgmax
,
Reshape
,
ScalarFromTensor
,
TensorFromScalar
,
)
)
from
theano.scalar.basic
import
ScalarOp
,
Composite
,
Cast
,
Clip
,
Identity
from
theano.tensor.elemwise
import
CAReduce
,
DimShuffle
,
Elemwise
from
theano.tensor.elemwise
import
Elemwise
,
CAReduce
,
DimShuffle
from
theano.tensor.extra_ops
import
(
from
theano.compile.ops
import
(
Bartlett
,
DeepCopyOp
,
CumOp
,
Shape
,
DiffOp
,
Shape_i
,
FillDiagonal
,
SpecifyShape
,
FillDiagonalOffset
,
Rebroadcast
,
RavelMultiIndex
,
ViewOp
,
RepeatOp
,
Unique
,
UnravelIndex
,
)
)
from
theano.tensor.opt
import
MakeVector
from
theano.tensor.nnet.sigm
import
ScalarSoftplus
from
theano.tensor.nlinalg
import
(
from
theano.tensor.nlinalg
import
(
SVD
,
AllocDiag
,
Det
,
Det
,
Eig
,
Eig
,
Eigh
,
Eigh
,
ExtractDiag
,
MatrixInverse
,
MatrixInverse
,
QRFull
,
QRFull
,
QRIncomplete
,
QRIncomplete
,
SVD
,
ExtractDiag
,
AllocDiag
,
)
)
from
theano.tensor.nnet.sigm
import
ScalarSoftplus
from
theano.tensor.slinalg
import
(
from
theano.tensor.opt
import
MakeVector
Cholesky
,
from
theano.tensor.slinalg
import
Cholesky
,
Solve
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.type_other
import
MakeSlice
from
theano.tensor.extra_ops
import
(
CumOp
,
DiffOp
,
RepeatOp
,
Bartlett
,
FillDiagonal
,
FillDiagonalOffset
,
Unique
,
UnravelIndex
,
RavelMultiIndex
,
)
if
theano
.
config
.
floatX
==
"float64"
:
if
theano
.
config
.
floatX
==
"float64"
:
jax
.
config
.
update
(
"jax_enable_x64"
,
True
)
jax
.
config
.
update
(
"jax_enable_x64"
,
True
)
...
...
theano/sandbox/linalg/__init__.py
浏览文件 @
7029d8c0
from
theano.
tensor.slinalg
import
cholesky
,
solve
,
eigvalsh
from
theano.
sandbox.linalg.ops
import
psd
,
spectral_radius_bound
from
theano.tensor.nlinalg
import
(
from
theano.tensor.nlinalg
import
(
matrix_inverse
,
diag
,
extract_diag
,
alloc_diag
,
alloc_diag
,
det
,
det
,
diag
,
eig
,
eig
,
eigh
,
eigh
,
extract_diag
,
matrix_inverse
,
trace
,
trace
,
)
)
from
theano.
sandbox.linalg.ops
import
psd
,
spectral_radius_bound
from
theano.
tensor.slinalg
import
cholesky
,
eigvalsh
,
solve
theano/sandbox/linalg/ops.py
浏览文件 @
7029d8c0
import
logging
import
logging
import
theano.tensor
from
six
import
integer_types
from
six
import
integer_types
from
theano.gof
import
Op
,
Apply
import
theano.tensor
from
theano
import
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
import
DimShuffle
,
Dot
from
theano.tensor.blas
import
Dot22
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
(
from
theano.tensor.nlinalg
import
(
MatrixInverse
,
MatrixInverse
,
matrix_inverse
,
det
,
extract_diag
,
extract_diag
,
matrix_inverse
,
trace
,
trace
,
det
,
)
)
from
theano.tensor.opt
import
(
from
theano.tensor.slinalg
import
Cholesky
,
cholesky
,
Solve
,
solve
,
imported_scipy
register_canonicalize
,
register_specialize
,
register_stabilize
,
)
from
theano.tensor.slinalg
import
Cholesky
,
Solve
,
cholesky
,
imported_scipy
,
solve
logger
=
logging
.
getLogger
(
__name__
)
logger
=
logging
.
getLogger
(
__name__
)
...
...
theano/sandbox/multinomial.py
浏览文件 @
7029d8c0
import
copy
import
copy
import
warnings
import
numpy
as
np
import
numpy
as
np
import
warnings
import
theano
import
theano
import
theano.tensor
as
tt
import
theano.tensor
as
tt
from
theano
import
Apply
,
Op
from
theano
import
Op
,
Apply
from
theano.scalar
import
as_scalar
from
theano.scalar
import
as_scalar
...
...
theano/sandbox/neighbours.py
浏览文件 @
7029d8c0
...
@@ -3,6 +3,7 @@ Neighbours was moved into theano.tensor.nnet.neighbours.
...
@@ -3,6 +3,7 @@ Neighbours was moved into theano.tensor.nnet.neighbours.
This file was created for compatibility.
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"
]
__all__
=
[
"images2neibs"
,
"neibs2images"
,
"Images2Neibs"
]
theano/sandbox/rng_mrg.py
浏览文件 @
7029d8c0
...
@@ -18,23 +18,22 @@ import warnings
...
@@ -18,23 +18,22 @@ import warnings
import
numpy
as
np
import
numpy
as
np
from
six
import
integer_types
,
string_types
from
six
import
integer_types
,
string_types
import
theano
import
theano
from
theano
import
Op
,
Apply
,
shared
,
config
,
Variable
from
theano
import
Apply
,
Op
,
Variable
,
config
,
function
,
gradient
,
shared
,
tensor
from
theano
import
gradient
,
function
from
theano.compile
import
optdb
from
theano.gof
import
ParamsType
,
local_optimizer
from
theano.gradient
import
undefined_grad
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
(
from
theano.tensor
import
(
TensorType
,
TensorType
,
as_tensor_variable
,
as_tensor_variable
,
get_vector_length
,
cast
,
cast
,
get_vector_length
,
opt
,
opt
,
scal
,
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
.
import
multinomial
...
...
theano/sandbox/softsign.py
浏览文件 @
7029d8c0
from
theano.tensor.nnet.nnet
import
softsign
# noqa
from
theano.tensor.nnet.nnet
import
softsign
# noqa
import
sys
import
sys
print
(
print
(
"DEPRECATION WARNING: softsign was moved from theano.sandbox.softsign to "
"DEPRECATION WARNING: softsign was moved from theano.sandbox.softsign to "
"theano.tensor.nnet.nnet "
,
"theano.tensor.nnet.nnet "
,
...
...
theano/sandbox/solve.py
浏览文件 @
7029d8c0
import
warnings
import
warnings
from
theano.tensor.slinalg
import
solve
# noqa
from
theano.tensor.slinalg
import
solve
# noqa
message
=
(
message
=
(
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论