Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove trailing whitespaces #8536

Merged
merged 1 commit into from Jan 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion chainer/exporters/caffe.py
Expand Up @@ -383,7 +383,7 @@ def __call__(self, name, inputs, outputs):
for i in inputs[0].shape:
f.write(' dim: ' + str(i))
f.write(' } }\n'
'} \n')
'}\n')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note:
Good to fix the line, too, while it is a part of protobuf txt (the description in #8179 was not exact).

for i in dumped_list:
self.dump_function_object(i, f, net)
finally:
Expand Down
2 changes: 1 addition & 1 deletion chainer/function_node.py
Expand Up @@ -473,7 +473,7 @@ def check_layout_forward(self, inputs):
if not all([x.layout == inputs[0].layout for x in inputs]):
raise RuntimeError(
'Inputs with mixed memory layouts were given to '
'an elementwise function. \n'
'an elementwise function.\n'
'Function: {}\n'
'Input layouts: {}\n'.format(
self.label,
Expand Down
2 changes: 1 addition & 1 deletion chainer/functions/array/tile.py
Expand Up @@ -17,7 +17,7 @@ def __init__(self, reps):
isinstance(x, six.integer_types) for x in reps):
self.reps = reps
else:
msg = 'reps must be int or tuple of ints. \n' \
msg = 'reps must be int or tuple of ints.\n' \
'Actual: {0}'.format(type(reps))
raise TypeError(msg)

Expand Down
2 changes: 1 addition & 1 deletion chainer/testing/array.py
Expand Up @@ -29,7 +29,7 @@ def assert_allclose(x, y, atol=1e-5, rtol=1e-4, verbose=True):
f = six.StringIO()
f.write(str(e) + '\n\n')
f.write(
'assert_allclose failed: \n' +
'assert_allclose failed:\n' +
' shape: {} {}\n'.format(x.shape, y.shape) +
' dtype: {} {}\n'.format(x.dtype, y.dtype))
if x.shape == y.shape:
Expand Down
4 changes: 2 additions & 2 deletions chainermn/global_except_hook.py
Expand Up @@ -19,8 +19,8 @@ def _global_except_hook(exctype, value, traceback):
rank = mpi4py.MPI.COMM_WORLD.Get_rank()
sys.stderr.write('\n')
sys.stderr.write('******************************************\n')
sys.stderr.write('ChainerMN: \n')
sys.stderr.write(' Uncaught exception on rank {}. \n'.format(rank))
sys.stderr.write('ChainerMN:\n')
sys.stderr.write(' Uncaught exception on rank {}.\n'.format(rank))
sys.stderr.write(' Calling MPI_Abort() to shut down MPI...\n')
sys.stderr.write('******************************************\n')
sys.stderr.write('\n\n')
Expand Down
2 changes: 1 addition & 1 deletion examples/chainermn/imagenet/train_imagenet.py
Expand Up @@ -28,7 +28,7 @@
if major <= 2 or (major == 3 and minor < 4):
sys.stderr.write('Error: ImageNet example uses '
'chainer.iterators.MultiprocessIterator, '
'which works only with Python >= 3.4. \n'
'which works only with Python >= 3.4.\n'
'For more details, see '
'http://chainermn.readthedocs.io/en/master/'
'tutorial/tips_faqs.html#using-multiprocessiterator\n')
Expand Down
4 changes: 2 additions & 2 deletions tests/chainermn_tests/communicator_tests/test_mpi.py
Expand Up @@ -45,9 +45,9 @@ def run(self):
"One of the processes " \
"***** crashed or you encountered a known bug of " \
"Open MPI." \
"***** The following Open MPI versions have a bug \n" \
"***** The following Open MPI versions have a bug\n" \
"***** that cause MPI_Bcast() deadlock " \
"when GPUDirect is used: \n" \
"when GPUDirect is used:\n" \
"***** 3.0.0, 3.0.1, 3.0.2, 3.1.0, 3.1.1, 3.1.2\n" \
"***** Your Open MPI version: {}\n".format(version)
if self.rank == 1:
Expand Down