提交 8134ccce authored 作者: David Warde-Farley's avatar David Warde-Farley

Trailing whitespace removal.

上级 01a99d79
......@@ -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()
......
......@@ -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
......
......@@ -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
"""
......
......@@ -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,
......
......@@ -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)
{
......
......@@ -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 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论