Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
3e024c1f
提交
3e024c1f
authored
9月 19, 2016
作者:
Frédéric Bastien
提交者:
GitHub
9月 19, 2016
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #4972 from Inoryy/py2x-compat
remove python2x.py, fix imports associated with it
上级
6366d769
7ace6b70
隐藏空白字符变更
内嵌
并排
正在显示
20 个修改的文件
包含
26 行增加
和
35 行删除
+26
-35
__init__.py
theano/compat/__init__.py
+1
-2
python2x.py
theano/compat/python2x.py
+0
-13
ops.py
theano/compile/ops.py
+1
-1
destroyhandler.py
theano/gof/destroyhandler.py
+1
-2
fg.py
theano/gof/fg.py
+1
-1
opt.py
theano/gof/opt.py
+2
-2
test_utils.py
theano/gof/tests/test_utils.py
+1
-1
toolbox.py
theano/gof/toolbox.py
+2
-1
utils.py
theano/gof/utils.py
+2
-1
gradient.py
theano/gradient.py
+2
-1
scan.py
theano/scan_module/scan.py
+1
-1
scan_op.py
theano/scan_module/scan_op.py
+2
-1
scan_opt.py
theano/scan_module/scan_opt.py
+1
-1
scan_utils.py
theano/scan_module/scan_utils.py
+1
-1
test_scan.py
theano/scan_module/tests/test_scan.py
+2
-1
mlp_test.py
theano/tensor/tests/mlp_test.py
+1
-1
test_determinism.py
theano/tests/test_determinism.py
+1
-1
test_gradient.py
theano/tests/test_gradient.py
+2
-1
test_pickle_unpickle_theano_fn.py
theano/tests/test_pickle_unpickle_theano_fn.py
+1
-1
updates.py
theano/updates.py
+1
-1
没有找到文件。
theano/compat/__init__.py
浏览文件 @
3e024c1f
...
...
@@ -58,8 +58,7 @@ else:
cmp
=
cmp
# Older Python 2.x compatibility
from
theano.compat.python2x
import
DictMixin
,
OrderedDict
from
collections
import
OrderedDict
,
MutableMapping
as
DictMixin
def
decode
(
x
):
return
x
...
...
theano/compat/python2x.py
deleted
100644 → 0
浏览文件 @
6366d769
"""
Helper functions to make theano backwards compatible with python 2.6 - 2.7
Now mostly there for compatibility as we don't support Python 2.6 anymore.
"""
from
__future__
import
absolute_import
,
print_function
,
division
try
:
from
UserDict
import
DictMixin
except
ImportError
:
from
collections
import
MutableMapping
as
DictMixin
from
collections
import
OrderedDict
,
Counter
__all__
=
[
'DictMixin'
,
'OrderedDict'
,
'Counter'
]
theano/compile/ops.py
浏览文件 @
3e024c1f
...
...
@@ -5,6 +5,7 @@ help make new Ops more rapidly.
"""
from
__future__
import
absolute_import
,
print_function
,
division
from
collections
import
OrderedDict
import
copy
import
six.moves.cPickle
as
pickle
...
...
@@ -12,7 +13,6 @@ import warnings
import
theano
from
theano
import
gof
from
theano.compat
import
OrderedDict
from
six
import
iteritems
,
integer_types
from
six.moves
import
xrange
...
...
theano/gof/destroyhandler.py
浏览文件 @
3e024c1f
...
...
@@ -5,14 +5,13 @@ and inplace operations.
"""
from
__future__
import
absolute_import
,
print_function
,
division
from
collections
import
deque
from
collections
import
deque
,
OrderedDict
from
six
import
iteritems
import
theano
from
.
import
toolbox
from
.
import
graph
from
theano.compat
import
OrderedDict
from
theano.misc.ordered_set
import
OrderedSet
from
.fg
import
InconsistencyError
...
...
theano/gof/fg.py
浏览文件 @
3e024c1f
...
...
@@ -5,6 +5,7 @@ types that it can raise.
"""
from
__future__
import
absolute_import
,
print_function
,
division
from
collections
import
OrderedDict
import
sys
import
time
import
traceback
...
...
@@ -15,7 +16,6 @@ from theano.gof import utils
from
theano.gof
import
toolbox
from
theano
import
config
from
theano.compat
import
OrderedDict
from
six
import
iteritems
,
itervalues
from
six.moves
import
StringIO
from
theano.misc.ordered_set
import
OrderedSet
...
...
theano/gof/opt.py
浏览文件 @
3e024c1f
...
...
@@ -5,7 +5,7 @@ amount of useful generic optimization tools.
"""
from
__future__
import
absolute_import
,
print_function
,
division
from
collections
import
deque
,
defaultdict
from
collections
import
deque
,
defaultdict
,
OrderedDict
import
copy
import
inspect
import
logging
...
...
@@ -19,7 +19,7 @@ import numpy
import
theano
from
theano
import
config
from
theano.compat
import
izip
,
OrderedDict
from
theano.compat
import
izip
from
six
import
string_types
,
iteritems
,
itervalues
,
integer_types
from
six.moves
import
reduce
from
theano.gof
import
graph
,
op
,
utils
,
unify
,
toolbox
...
...
theano/gof/tests/test_utils.py
浏览文件 @
3e024c1f
from
__future__
import
absolute_import
,
print_function
,
division
from
collections
import
OrderedDict
import
theano
from
theano.compat
import
OrderedDict
from
theano.gof.utils
import
(
give_variables_names
,
hash_from_dict
,
remove
,
unique
)
...
...
theano/gof/toolbox.py
浏览文件 @
3e024c1f
from
__future__
import
absolute_import
,
print_function
,
division
from
functools
import
partial
from
collections
import
OrderedDict
import
sys
import
time
import
inspect
import
theano
from
theano
import
config
from
theano.compat
import
OrderedDict
from
theano.gof
import
graph
...
...
theano/gof/utils.py
浏览文件 @
3e024c1f
from
__future__
import
absolute_import
,
print_function
,
division
from
collections
import
OrderedDict
import
linecache
import
sys
import
traceback
...
...
@@ -8,7 +9,7 @@ from six import iteritems, integer_types, string_types, with_metaclass
from
six.moves
import
StringIO
from
theano
import
config
from
theano.compat
import
OrderedDict
,
PY3
from
theano.compat
import
PY3
def
simple_extract_stack
(
f
=
None
,
limit
=
None
,
skips
=
[]):
...
...
theano/gradient.py
浏览文件 @
3e024c1f
"""Driver for gradient calculations."""
from
__future__
import
absolute_import
,
print_function
,
division
from
collections
import
OrderedDict
import
six.moves.builtins
as
builtins
import
logging
import
time
...
...
@@ -12,7 +13,7 @@ import theano
from
theano
import
gof
from
theano.gof
import
utils
,
Variable
from
theano.compat
import
OrderedDict
,
izip
from
theano.compat
import
izip
from
six.moves
import
xrange
,
reduce
from
theano.gof.null_type
import
NullType
,
null_type
from
theano.gof.op
import
get_debug_values
...
...
theano/scan_module/scan.py
浏览文件 @
3e024c1f
...
...
@@ -47,6 +47,7 @@ __contact__ = "Razvan Pascanu <r.pascanu@gmail>"
import
logging
import
numpy
import
warnings
from
collections
import
OrderedDict
from
theano.compat
import
ifilter
,
izip
from
six
import
iteritems
,
integer_types
...
...
@@ -59,7 +60,6 @@ from theano import tensor
from
theano
import
config
from
theano.updates
import
OrderedUpdates
from
theano.compile
import
ops
from
theano.compat
import
OrderedDict
from
theano.scan_module
import
scan_op
...
...
theano/scan_module/scan_op.py
浏览文件 @
3e024c1f
...
...
@@ -60,6 +60,7 @@ import copy
import
itertools
import
logging
import
time
from
collections
import
OrderedDict
import
numpy
from
six
import
iteritems
,
integer_types
...
...
@@ -73,7 +74,7 @@ from theano import compile, config, gradient, gof, tensor
from
theano.gof
import
PureOp
,
Apply
from
theano.gof.graph
import
io_connection_pattern
from
theano.gof.toolbox
import
NoOutputFromInplace
from
theano.compat
import
OrderedDict
,
izip
from
theano.compat
import
izip
from
theano.tensor
import
TensorType
from
theano.tensor.opt
import
Shape_i
from
theano.gradient
import
grad_undefined
,
DisconnectedType
,
NullType
...
...
theano/scan_module/scan_opt.py
浏览文件 @
3e024c1f
...
...
@@ -53,13 +53,13 @@ from __future__ import absolute_import, print_function, division
import
logging
import
copy
from
sys
import
maxsize
from
collections
import
OrderedDict
import
numpy
import
theano
from
theano
import
tensor
,
scalar
from
theano.tensor
import
opt
,
get_scalar_constant_value
,
Alloc
,
AllocEmpty
from
theano
import
gof
from
theano.compat
import
OrderedDict
from
six
import
integer_types
,
iteritems
from
six.moves
import
xrange
from
theano.compile
import
optdb
...
...
theano/scan_module/scan_utils.py
浏览文件 @
3e024c1f
...
...
@@ -18,6 +18,7 @@ __contact__ = "Razvan Pascanu <r.pascanu@gmail>"
import
copy
import
logging
import
warnings
from
collections
import
OrderedDict
import
numpy
...
...
@@ -28,7 +29,6 @@ from six.moves import xrange
from
theano.compile.pfunc
import
rebuild_collect_shared
from
theano
import
gof
,
compat
from
theano
import
tensor
,
scalar
from
theano.compat
import
OrderedDict
from
theano.tensor.basic
import
get_scalar_constant_value
...
...
theano/scan_module/tests/test_scan.py
浏览文件 @
3e024c1f
...
...
@@ -7,6 +7,7 @@ from tempfile import mkdtemp
import
time
import
unittest
import
copy
from
collections
import
OrderedDict
import
six.moves.cPickle
as
pickle
from
six.moves
import
xrange
...
...
@@ -23,7 +24,7 @@ from theano.compile.pfunc import rebuild_collect_shared
from
theano.tests
import
unittest_tools
as
utt
import
theano.scalar.sharedvar
from
theano.scan_module.scan_op
import
Scan
from
theano.compat
import
PY3
,
OrderedDict
from
theano.compat
import
PY3
from
theano.tests.unittest_tools
import
attr
...
...
theano/tensor/tests/mlp_test.py
浏览文件 @
3e024c1f
...
...
@@ -7,11 +7,11 @@ from __future__ import absolute_import, print_function, division
__docformat__
=
'restructedtext en'
from
collections
import
OrderedDict
import
numpy
import
theano
import
theano.tensor
as
T
from
theano.compat
import
OrderedDict
def
gen_data
():
...
...
theano/tests/test_determinism.py
浏览文件 @
3e024c1f
from
__future__
import
absolute_import
,
print_function
,
division
from
collections
import
OrderedDict
from
theano.tests.record
import
RecordMode
,
Record
from
theano.compat
import
OrderedDict
from
theano.tests
import
disturb_mem
import
numpy
as
np
import
theano
...
...
theano/tests/test_gradient.py
浏览文件 @
3e024c1f
from
__future__
import
absolute_import
,
print_function
,
division
from
collections
import
OrderedDict
#
# UNIT TEST
#
...
...
@@ -9,7 +10,7 @@ from six.moves import xrange
import
theano
from
theano
import
gof
from
theano.compat
import
OrderedDict
,
izip
from
theano.compat
import
izip
from
theano.tests
import
unittest_tools
as
utt
from
theano
import
gradient
...
...
theano/tests/test_pickle_unpickle_theano_fn.py
浏览文件 @
3e024c1f
...
...
@@ -13,9 +13,9 @@ The config option is in configdefaults.py
This note is written by Li Yao.
"""
from
collections
import
OrderedDict
import
numpy
import
six.moves.cPickle
as
pickle
from
theano.compat
import
OrderedDict
import
theano
import
theano.tensor
as
T
...
...
theano/updates.py
浏览文件 @
3e024c1f
...
...
@@ -2,7 +2,7 @@
"""
from
__future__
import
absolute_import
,
print_function
,
division
from
theano.compat
import
OrderedDict
from
collections
import
OrderedDict
from
six
import
iteritems
from
theano.compile.sharedvalue
import
SharedVariable
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论