Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
8134ccce
提交
8134ccce
authored
5月 05, 2015
作者:
David Warde-Farley
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Trailing whitespace removal.
上级
01a99d79
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
37 行增加
和
37 行删除
+37
-37
theano-nose
bin/theano-nose
+9
-9
profiling.py
theano/compile/profiling.py
+3
-3
test_conv_cuda_ndarray.py
theano/sandbox/cuda/tests/test_conv_cuda_ndarray.py
+1
-1
raw_random.py
theano/tensor/raw_random.py
+4
-4
downsample.py
theano/tensor/signal/downsample.py
+4
-4
test_printing.py
theano/tests/test_printing.py
+16
-16
没有找到文件。
bin/theano-nose
浏览文件 @
8134ccce
...
...
@@ -81,7 +81,7 @@ def main():
time_prof_args
=
[
arg
for
arg
in
sys
.
argv
if
arg
==
'--time-profile'
]
for
arg
in
time_prof_args
:
sys
.
argv
.
remove
(
arg
)
# Time-profiling and batch modes
if
time_prof_args
or
batch_args
:
from
theano.tests
import
run_tests_in_batch
...
...
@@ -156,7 +156,7 @@ def help():
progresses will be made to standard output after every group of
n tests. Otherwise, notification will occur after every group
of 100 tests.
The files 'timeprof_sort' and 'timeprof_nosort' both contain one
record for each test and comprise the following fields:
- test running-time
...
...
@@ -166,7 +166,7 @@ def help():
information is contained in test name
- test outcome ('OK', 'SKIPPED TEST', 'FAILED TEST' or
'FAILED PARSING')
In 'timeprof_sort', test records are sorted according to
running-time whereas in 'timeprof_nosort' records are reported
according to sequential number. The former classification is the
...
...
@@ -174,7 +174,7 @@ def help():
to same or close classes and files have close sequential, the
latter may be used to identify duration patterns among the tests
numbers. A full log is also saved as 'timeprof_rawlog'.
--without-knownfailure: Do not load the KnownFailure plugin.
--theano: This parameter is replaced with the path to the theano
...
...
@@ -198,12 +198,12 @@ def help():
class
DisabDocString
(
Plugin
):
"""
When activated, a custom Nosetests plugin created through this class
will preclude automatic replacement in display of the name of the test
by the first line in its documentation string.
Sources:
http://nose.readthedocs.org/en/latest/developing.html
http://nose.readthedocs.org/en/latest/further_reading.html
...
...
@@ -214,10 +214,10 @@ class DisabDocString(Plugin):
https://github.com/Merino/nose-description-fixer-plugin/commit/
df94596f29c04fea8001713dd9b04bf3720aebf4
"""
enabled
=
False
# plugin disabled by default
score
=
2000
# high score ensures priority over other plugins
def
__init__
(
self
):
# 'super.__init__(self):' would have achieved exactly the same
if
self
.
name
is
None
:
...
...
@@ -253,7 +253,7 @@ class DisabDocString(Plugin):
# 'describeTest' is also called when the test result in Nosetests calls
# 'test.shortDescription()' and can thus be used to alter the display.
return
False
if
__name__
==
'__main__'
:
if
'--help'
in
sys
.
argv
or
'-h'
in
sys
.
argv
:
help
()
...
...
theano/compile/profiling.py
浏览文件 @
8134ccce
...
...
@@ -709,7 +709,7 @@ class ProfileStats(object):
def
count_running_memory
(
order
,
fgraph
,
nodes_mem
):
"""
Calculate memory with specific node order
Calculate memory with specific node order
Return a list including the following values
1. node_memory_size
Sum of the size of all variables that actually allocate
...
...
@@ -717,10 +717,10 @@ class ProfileStats(object):
2. running_memory_size
The memory allocated after the current apply node
3. running_max_memory_size
The maximum of running_memory_size during the function
The maximum of running_memory_size during the function
4. node_memory_saved_by_view
The sum of memory saved by returning view instead of new
allocation
allocation
5. node_memory_saved_by_inplace
The sum of memory saved by reusing the input instead of
new allocation
...
...
theano/sandbox/cuda/tests/test_conv_cuda_ndarray.py
浏览文件 @
8134ccce
...
...
@@ -653,7 +653,7 @@ class TestConv2DGPU(unittest.TestCase):
class
TestConvWithPadding
(
object
):
"""test conv ops that support arbitrary padding via border_mode
note that in order to make the yield work, we can not subclass from
note that in order to make the yield work, we can not subclass from
unittest.TestCase
"""
...
...
theano/tensor/raw_random.py
浏览文件 @
8134ccce
...
...
@@ -638,7 +638,7 @@ def poisson(random_state, size=None, lam=1.0, ndim=None, dtype='int64'):
Draw samples from a Poisson distribution.
The Poisson distribution is the limit of the Binomial distribution for large N.
:param lam: float or ndarray-like of the same shape as size parameter
Expectation of interval, should be >= 0.
...
...
@@ -650,7 +650,7 @@ def poisson(random_state, size=None, lam=1.0, ndim=None, dtype='int64'):
size or ndim must be given
"""
lam
=
tensor
.
as_tensor_variable
(
lam
)
ndim
,
size
,
bcast
=
_infer_ndim_bcast
(
ndim
,
size
)
op
=
RandomFunction
(
"poisson"
,
tensor
.
TensorType
(
dtype
=
dtype
,
...
...
@@ -926,7 +926,7 @@ class RandomStreamsBase(object):
"""
return
self
.
gen
(
random_integers
,
size
,
low
,
high
,
ndim
=
ndim
,
dtype
=
dtype
)
def
choice
(
self
,
size
=
None
,
a
=
2
,
replace
=
True
,
p
=
None
,
ndim
=
None
,
dtype
=
'int64'
):
"""
...
...
@@ -943,7 +943,7 @@ class RandomStreamsBase(object):
def
poisson
(
self
,
size
=
None
,
lam
=
None
,
ndim
=
None
,
dtype
=
'int64'
):
"""
Draw samples from a Poisson distribution.
The Poisson distribution is the limit of the Binomial distribution for large N.
If the size argument is ambiguous on the number of dimensions,
...
...
theano/tensor/signal/downsample.py
浏览文件 @
8134ccce
...
...
@@ -22,9 +22,9 @@ def max_pool2D(*args, **kwargs):
def
max_pool_2d_same_size
(
input
,
patch_size
):
"""
Takes as input a 4-D tensor. It sets all non maximum values
of non-overlapping patches of size (patch_size[0],patch_size[1]) to zero,
keeping only the maximum values. The output has the same dimensions as
Takes as input a 4-D tensor. It sets all non maximum values
of non-overlapping patches of size (patch_size[0],patch_size[1]) to zero,
keeping only the maximum values. The output has the same dimensions as
the input.
:type input: 4-D theano tensor of input images.
...
...
@@ -348,7 +348,7 @@ class DownsampleFactorMax(Op):
}
if (
%(ignore_border)
s)
{
// '/' in C is different from '/' in python
if (r -
%(ds0)
s < 0)
{
...
...
theano/tests/test_printing.py
浏览文件 @
8134ccce
...
...
@@ -173,11 +173,11 @@ def test_debugprint():
debugprint
(
G
,
file
=
s
,
ids
=
'int'
)
s
=
s
.
getvalue
()
# The additional white space are needed!
reference
=
"""Elemwise{add,no_inplace} [@0] ''
|Elemwise{add,no_inplace} [@1] 'C'
reference
=
"""Elemwise{add,no_inplace} [@0] ''
|Elemwise{add,no_inplace} [@1] 'C'
| |A [@2]
| |B [@3]
|Elemwise{add,no_inplace} [@4] ''
|Elemwise{add,no_inplace} [@4] ''
|D [@5]
|E [@6]
"""
...
...
@@ -193,11 +193,11 @@ def test_debugprint():
debugprint
(
G
,
file
=
s
,
ids
=
'CHAR'
)
s
=
s
.
getvalue
()
# The additional white space are needed!
reference
=
"""Elemwise{add,no_inplace} [@A] ''
|Elemwise{add,no_inplace} [@B] 'C'
reference
=
"""Elemwise{add,no_inplace} [@A] ''
|Elemwise{add,no_inplace} [@B] 'C'
| |A [@C]
| |B [@D]
|Elemwise{add,no_inplace} [@E] ''
|Elemwise{add,no_inplace} [@E] ''
|D [@F]
|E [@G]
"""
...
...
@@ -213,9 +213,9 @@ def test_debugprint():
debugprint
(
G
,
file
=
s
,
ids
=
'CHAR'
,
stop_on_name
=
True
)
s
=
s
.
getvalue
()
# The additional white space are needed!
reference
=
"""Elemwise{add,no_inplace} [@A] ''
|Elemwise{add,no_inplace} [@B] 'C'
|Elemwise{add,no_inplace} [@C] ''
reference
=
"""Elemwise{add,no_inplace} [@A] ''
|Elemwise{add,no_inplace} [@B] 'C'
|Elemwise{add,no_inplace} [@C] ''
|D [@D]
|E [@E]
"""
...
...
@@ -231,13 +231,13 @@ def test_debugprint():
debugprint
(
G
,
file
=
s
,
ids
=
''
)
s
=
s
.
getvalue
()
# The additional white space are needed!
reference
=
"""Elemwise{add,no_inplace} ''
|Elemwise{add,no_inplace} 'C'
| |A
| |B
|Elemwise{add,no_inplace} ''
|D
|E
reference
=
"""Elemwise{add,no_inplace} ''
|Elemwise{add,no_inplace} 'C'
| |A
| |B
|Elemwise{add,no_inplace} ''
|D
|E
"""
if
s
!=
reference
:
print
(
'--'
+
s
+
'--'
)
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论