Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
7bad2e2a
提交
7bad2e2a
authored
1月 14, 2016
作者:
abergeron
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #3867 from nouiz/small
small stuff, tests, doc, docgen.py bugfix, doc, small code cleanup
上级
c282d072
2e660ce4
显示空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
23 行增加
和
8 行删除
+23
-8
install.txt
doc/install.txt
+0
-4
docgen.py
doc/scripts/docgen.py
+4
-1
using_multi_gpu.txt
doc/tutorial/using_multi_gpu.txt
+4
-0
test_compute_test_value.py
theano/gof/tests/test_compute_test_value.py
+2
-1
pkl_utils.py
theano/misc/pkl_utils.py
+8
-0
printing.py
theano/printing.py
+1
-1
test_type.py
theano/sandbox/cuda/tests/test_type.py
+4
-1
没有找到文件。
doc/install.txt
浏览文件 @
7bad2e2a
...
@@ -4,10 +4,6 @@
...
@@ -4,10 +4,6 @@
Installing Theano
Installing Theano
=================
=================
.. note::
If you are a member of LISA Labo, have a look at :ref:`lisa_labo` for
lab-specific installation instructions.
Requirements
Requirements
------------
------------
...
...
doc/scripts/docgen.py
浏览文件 @
7bad2e2a
...
@@ -31,7 +31,7 @@ if __name__ == '__main__':
...
@@ -31,7 +31,7 @@ if __name__ == '__main__':
'processed. Specifying files will implies --cache.'
)
'processed. Specifying files will implies --cache.'
)
sys
.
exit
(
0
)
sys
.
exit
(
0
)
if
options
[
'--rst'
]
or
options
[
'--test'
]
:
if
not
(
options
[
'--rst'
]
or
options
[
'--test'
])
:
# Default is now rst
# Default is now rst
options
[
'--rst'
]
=
True
options
[
'--rst'
]
=
True
...
@@ -45,6 +45,7 @@ if __name__ == '__main__':
...
@@ -45,6 +45,7 @@ if __name__ == '__main__':
files
=
None
files
=
None
if
len
(
args
)
!=
0
:
if
len
(
args
)
!=
0
:
files
=
[
os
.
path
.
abspath
(
f
)
for
f
in
args
]
files
=
[
os
.
path
.
abspath
(
f
)
for
f
in
args
]
currentdir
=
os
.
getcwd
()
mkdir
(
outdir
)
mkdir
(
outdir
)
os
.
chdir
(
outdir
)
os
.
chdir
(
outdir
)
...
@@ -91,3 +92,5 @@ if __name__ == '__main__':
...
@@ -91,3 +92,5 @@ if __name__ == '__main__':
mkdir
(
"doc"
)
mkdir
(
"doc"
)
sys
.
path
[
0
:
0
]
=
[
os
.
path
.
join
(
throot
,
'doc'
)]
sys
.
path
[
0
:
0
]
=
[
os
.
path
.
join
(
throot
,
'doc'
)]
call_sphinx
(
'doctest'
,
'.'
)
call_sphinx
(
'doctest'
,
'.'
)
# To go back to the original current directory.
os
.
chdir
(
currentdir
)
doc/tutorial/using_multi_gpu.txt
浏览文件 @
7bad2e2a
...
@@ -22,6 +22,10 @@ models between machines.
...
@@ -22,6 +22,10 @@ models between machines.
cases observed, but make sure to double-check your results before
cases observed, but make sure to double-check your results before
publishing a paper or anything of the sort.
publishing a paper or anything of the sort.
.. note::
For data-parallelism, you probably are better using `platoon
<https://github.com/mila-udem/platoon>`_.
Defining the context map
Defining the context map
------------------------
------------------------
...
...
theano/gof/tests/test_compute_test_value.py
浏览文件 @
7bad2e2a
...
@@ -286,7 +286,8 @@ class TestComputeTestValue(unittest.TestCase):
...
@@ -286,7 +286,8 @@ class TestComputeTestValue(unittest.TestCase):
# Get frame info 4 layers up
# Get frame info 4 layers up
frame_info
=
traceback
.
extract_tb
(
tb
)[
-
5
]
frame_info
=
traceback
.
extract_tb
(
tb
)[
-
5
]
# We should be in the "fx" function defined above
# We should be in the "fx" function defined above
assert
os
.
path
.
split
(
frame_info
[
0
])[
1
]
==
'test_compute_test_value.py'
expected
=
'test_compute_test_value.py'
assert
os
.
path
.
split
(
frame_info
[
0
])[
1
]
==
expected
,
frame_info
assert
frame_info
[
2
]
==
'fx'
assert
frame_info
[
2
]
==
'fx'
finally
:
finally
:
...
...
theano/misc/pkl_utils.py
浏览文件 @
7bad2e2a
...
@@ -44,6 +44,8 @@ class StripPickler(Pickler):
...
@@ -44,6 +44,8 @@ class StripPickler(Pickler):
"""
"""
Subclass of Pickler that strips unnecessary attributes from Theano objects.
Subclass of Pickler that strips unnecessary attributes from Theano objects.
.. versionadded:: 0.8
Example of use::
Example of use::
fn_args = dict(inputs=inputs,
fn_args = dict(inputs=inputs,
...
@@ -117,6 +119,8 @@ if PY3:
...
@@ -117,6 +119,8 @@ if PY3:
"""
"""
Allow to reload in python 3 some pickled numpy ndarray.
Allow to reload in python 3 some pickled numpy ndarray.
.. versionadded:: 0.8
Examples
Examples
--------
--------
...
@@ -136,6 +140,8 @@ else:
...
@@ -136,6 +140,8 @@ else:
"""
"""
Allow to reload in python 3 some pickled numpy ndarray.
Allow to reload in python 3 some pickled numpy ndarray.
.. versionadded:: 0.8
Examples
Examples
--------
--------
...
@@ -305,6 +311,7 @@ def dump(obj, file_handler, protocol=DEFAULT_PROTOCOL,
...
@@ -305,6 +311,7 @@ def dump(obj, file_handler, protocol=DEFAULT_PROTOCOL,
separate NPY file inside of the zip file.
separate NPY file inside of the zip file.
:type persistent_id: callable
:type persistent_id: callable
.. versionadded:: 0.8
.. note::
.. note::
The final file is simply a zipped file containing at least one file,
The final file is simply a zipped file containing at least one file,
...
@@ -347,6 +354,7 @@ def load(f, persistent_load=PersistentNdarrayLoad):
...
@@ -347,6 +354,7 @@ def load(f, persistent_load=PersistentNdarrayLoad):
used when pickling.
used when pickling.
:type persistent_load: callable, optional
:type persistent_load: callable, optional
.. versionadded:: 0.8
"""
"""
with
closing
(
zipfile
.
ZipFile
(
f
,
'r'
))
as
zip_file
:
with
closing
(
zipfile
.
ZipFile
(
f
,
'r'
))
as
zip_file
:
p
=
pickle
.
Unpickler
(
BytesIO
(
zip_file
.
open
(
'pkl'
)
.
read
()))
p
=
pickle
.
Unpickler
(
BytesIO
(
zip_file
.
open
(
'pkl'
)
.
read
()))
...
...
theano/printing.py
浏览文件 @
7bad2e2a
...
@@ -1028,7 +1028,7 @@ def pydotprint(fct, outfile=None,
...
@@ -1028,7 +1028,7 @@ def pydotprint(fct, outfile=None,
except
pd
.
InvocationException
:
except
pd
.
InvocationException
:
# based on https://github.com/Theano/Theano/issues/2988
# based on https://github.com/Theano/Theano/issues/2988
version
=
getattr
(
pd
,
'__version__'
,
""
)
version
=
getattr
(
pd
,
'__version__'
,
""
)
if
version
and
list
(
map
(
int
,
version
.
split
(
"."
)))
<
[
1
,
0
,
28
]:
if
version
and
[
int
(
n
)
for
n
in
version
.
split
(
"."
)]
<
[
1
,
0
,
28
]:
raise
Exception
(
"Old version of pydot detected, which can "
raise
Exception
(
"Old version of pydot detected, which can "
"cause issues with pydot printing. Try "
"cause issues with pydot printing. Try "
"upgrading pydot version to a newer one"
)
"upgrading pydot version to a newer one"
)
...
...
theano/sandbox/cuda/tests/test_type.py
浏览文件 @
7bad2e2a
import
os.path
import
os.path
from
nose.plugins.skip
import
SkipTest
from
nose.tools
import
assert_raises
from
nose.tools
import
assert_raises
import
numpy
import
numpy
...
@@ -8,7 +9,9 @@ from theano.compat import PY3
...
@@ -8,7 +9,9 @@ from theano.compat import PY3
from
theano.misc.pkl_utils
import
CompatUnpickler
from
theano.misc.pkl_utils
import
CompatUnpickler
from
theano.sandbox.cuda
import
cuda_available
from
theano.sandbox.cuda
import
cuda_available
if
cuda_available
:
if
not
cuda_available
:
raise
SkipTest
(
'Optional package cuda disabled'
)
else
:
from
theano.sandbox.cuda
import
CudaNdarray
from
theano.sandbox.cuda
import
CudaNdarray
# testfile created on cuda enabled machine using
# testfile created on cuda enabled machine using
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论