Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
98229fd2
提交
98229fd2
authored
7月 17, 2015
作者:
carriepl
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #3159 from nouiz/tests
Remove printing during test
上级
7f36ca79
d330930b
隐藏空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
32 行增加
和
16 行删除
+32
-16
.travis.yml
.travis.yml
+2
-2
compat.txt
doc/developer/compat.txt
+3
-0
index.txt
doc/index.txt
+2
-2
nanguardmode.txt
doc/library/compile/nanguardmode.txt
+2
-2
config.txt
doc/library/config.txt
+6
-2
debug_faq.txt
doc/tutorial/debug_faq.txt
+2
-2
configdefaults.py
theano/configdefaults.py
+1
-1
opt.py
theano/gof/opt.py
+4
-3
test_opt.py
theano/sandbox/cuda/tests/test_opt.py
+3
-1
test_scan.py
theano/scan_module/tests/test_scan.py
+7
-1
没有找到文件。
.travis.yml
浏览文件 @
98229fd2
...
...
@@ -24,8 +24,8 @@ before_install:
-
conda update --yes conda
install
:
-
if [[ $TRAVIS_PYTHON_VERSION == '2.6' ]]; then conda create --yes -q -n pyenv mkl python=2.6 numpy=1.6.2 scipy=0.11 nose=1.1 pyparsing=1.5 pip flake8==2.3 six==1.9.0; fi
-
if [[ $TRAVIS_PYTHON_VERSION == '3.3' ]]; then conda create --yes -q -n pyenv mkl python=3.3 numpy=1.9.1 scipy=0.14.0 nose=1.3.4 pyparsing=1.5 pip flake8==2.3 six==1.9.0; fi
-
if [[ $TRAVIS_PYTHON_VERSION == '2.6' ]]; then conda create --yes -q -n pyenv mkl python=2.6 numpy=1.6.2 scipy=0.11 nose=1.1 pyparsing=1.5 pip flake8==2.3 six==1.9.0
pep8==1.6.2 pyflakes==0.8.1
; fi
-
if [[ $TRAVIS_PYTHON_VERSION == '3.3' ]]; then conda create --yes -q -n pyenv mkl python=3.3 numpy=1.9.1 scipy=0.14.0 nose=1.3.4 pyparsing=1.5 pip flake8==2.3 six==1.9.0
pep8==1.6.2 pyflakes==0.8.1
; fi
-
source activate pyenv
-
if [[ $TRAVIS_PYTHON_VERSION == '2.6' ]]; then pip install pydot; fi
-
pip install . --no-deps
...
...
doc/developer/compat.txt
浏览文件 @
98229fd2
...
...
@@ -20,12 +20,14 @@ but here are some guidelines for the major things to be aware of.
syntax:
.. code-block:: python
except Exception as e:
...
* No tuple-unpacking in the argument list:
.. code-block:: python
def f(a, (b, c)): # wrong
...
...
...
@@ -35,6 +37,7 @@ but here are some guidelines for the major things to be aware of.
* Always use ``print(...)`` as a function, and add
.. code-block:: python
from __future__ import print_function
At the top of files that use ``print``, above all other imports.
...
...
doc/index.txt
浏览文件 @
98229fd2
...
...
@@ -76,11 +76,11 @@ installation and configuration, see :ref:`installing Theano <install>`.
.. raw:: html
<a href="https://crate.io/packages/Theano/"><img src="https://
pypip.in/v/Theano/badge.pn
g" alt="Latest PyPI version" /></a>
<a href="https://crate.io/packages/Theano/"><img src="https://
img.shields.io/pypi/v/Theano.sv
g" alt="Latest PyPI version" /></a>
.. raw:: html
<a href="https://crate.io/packages/Theano/"><img src="https://
pypip.in/d/Theano/badge.pn
g" alt="Number of PyPI downloads" /></a>
<a href="https://crate.io/packages/Theano/"><img src="https://
img.shields.io/pypi/dm/Theano.sv
g" alt="Number of PyPI downloads" /></a>
.. _available on PyPI: http://pypi.python.org/pypi/Theano
.. _Related Projects: https://github.com/Theano/Theano/wiki/Related-projects
...
...
doc/library/compile/nanguardmode.txt
浏览文件 @
98229fd2
.. _nanguardmode:
=================
=================
==
:mod:`nanguardmode`
=================
=================
==
.. module:: nanguardmode
:platform: Unix, Windows
...
...
doc/library/config.txt
浏览文件 @
98229fd2
...
...
@@ -389,14 +389,18 @@ import theano and print the config variable, as in:
.. attribute:: on_opt_error
String value: 'warn', 'raise'
or 'pdb
'
String value: 'warn', 'raise'
, 'pdb' or 'ignore
'
Default: 'warn'
When a crash occurs while trying to apply some optimization, either warn
the user and skip this optimization ('warn'), raise the exception
('raise'), or fall into the pdb debugger ('pdb').
('raise'), fall into the pdb debugger ('pdb') or ignore it ('ignore').
We suggest to never use 'ignore' except in tests.
If you encounter a warning, report it on `theano-dev`_.
.. _theano-dev: http://groups.google.com/group/theano-dev
.. attribute:: assert_no_cpu_op
...
...
doc/tutorial/debug_faq.txt
浏览文件 @
98229fd2
...
...
@@ -296,7 +296,7 @@ Tips:
"Why does my GPU function seem to be slow?"
------------------------------------------
------------------------------------------
-
When you compile a theano function, if you do not get the speedup that you expect over the
CPU performance of the same code. It is oftentimes due to the fact that some Ops might be running
...
...
@@ -307,7 +307,7 @@ options:
* ``warn``: Raise a warning
* ``pdb``: Stop with a pdb in the computational graph during the compilation
* ``raise``: Raise an error,
if there is a CPU Op in the computational graph.
if there is a CPU Op in the computational graph.
It is possible to use this mode by providing the flag in THEANO_FLAGS, such as:
``THEANO_FLAGS="float32,device=gpu,assert_no_cpu_op='raise'" python test.py``
...
...
theano/configdefaults.py
浏览文件 @
98229fd2
...
...
@@ -246,7 +246,7 @@ AddConfigVar(
'on_opt_error'
,
(
"What to do when an optimization crashes: warn and skip it, raise "
"the exception, or fall into the pdb debugger."
),
EnumStr
(
'warn'
,
'raise'
,
'pdb'
),
EnumStr
(
'warn'
,
'raise'
,
'pdb'
,
'ignore'
),
in_c_key
=
False
)
...
...
theano/gof/opt.py
浏览文件 @
98229fd2
...
...
@@ -1364,9 +1364,10 @@ class NavigatorOptimizer(Optimizer):
def
warn
(
exc
,
nav
,
repl_pairs
,
local_opt
):
"""failure_callback for NavigatorOptimizer: print traceback
"""
_logger
.
error
(
"Optimization failure due to:
%
s"
%
str
(
local_opt
))
_logger
.
error
(
"TRACEBACK:"
)
_logger
.
error
(
traceback
.
format_exc
())
if
config
.
on_opt_error
!=
'ignore'
:
_logger
.
error
(
"Optimization failure due to:
%
s"
%
str
(
local_opt
))
_logger
.
error
(
"TRACEBACK:"
)
_logger
.
error
(
traceback
.
format_exc
())
if
config
.
on_opt_error
==
'pdb'
:
pdb
.
post_mortem
(
sys
.
exc_info
()[
2
])
elif
isinstance
(
exc
,
AssertionError
)
or
config
.
on_opt_error
==
'raise'
:
...
...
theano/sandbox/cuda/tests/test_opt.py
浏览文件 @
98229fd2
...
...
@@ -106,15 +106,17 @@ def test_local_assert_no_cpu_op():
mode_local_assert
=
mode_local_assert
.
excluding
(
"local_gpu_elemwise_1"
)
old
=
config
.
assert_no_cpu_op
old2
=
config
.
on_opt_error
# If the flag is raise
try
:
config
.
assert_no_cpu_op
=
'raise'
config
.
on_opt_error
=
'ignore'
assert_raises
(
AssertionError
,
theano
.
function
,
[],
out
,
mode
=
mode_local_assert
)
finally
:
config
.
assert_no_cpu_op
=
old
config
.
on_opt_error
=
old2
# If the flag is ignore
try
:
...
...
theano/scan_module/tests/test_scan.py
浏览文件 @
98229fd2
...
...
@@ -4298,7 +4298,13 @@ class T_Scan(unittest.TestCase):
# There should be 3 outputs greater than 10: prior_result[0] at step 3,
# and prior_result[1] at steps 2 and 3.
assert
detect_large_outputs
.
large_count
==
3
if
theano
.
config
.
mode
in
[
"DEBUG_MODE"
,
"DebugMode"
]:
# DebugMode will run all the intermediate nodes, so we
# should expect a multiple of 3, not exactly 3.
assert
detect_large_outputs
.
large_count
%
3
==
0
else
:
assert
detect_large_outputs
.
large_count
==
3
class
ScanGpuTests
:
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论