Skip to content

Commit

Permalink
Remove trailing whitespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
himkt committed Jan 14, 2020
1 parent be11846 commit 1005b41
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion chainer/exporters/caffe.py
Original file line number Diff line number Diff line change
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')
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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

0 comments on commit 1005b41

Please sign in to comment.