Skip to content

Commit

Permalink
Reformulate some comments in executor_manager and executor_group (apa…
Browse files Browse the repository at this point in the history
  • Loading branch information
leezu authored and piiswrong committed Jun 20, 2017
1 parent 94d8e18 commit 3384d20
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions python/mxnet/executor_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def _split_input_slice(batch_size, work_load_list):
Raises
------
ValueError
If there are two many splits such that some slice can be empty.
In case of too many splits, leading to some empty slices.
"""
total_work_load = sum(work_load_list)
batch_num_list = [round(work_load * batch_size / total_work_load)
Expand All @@ -44,7 +44,7 @@ def _split_input_slice(batch_size, work_load_list):
begin = int(min((end, batch_size)))
end = int(min((begin + batch_num, batch_size)))
if begin >= end:
raise ValueError('Too many slices such that some splits are empty')
raise ValueError('Too many slices. Some splits are empty.')
slices.append(slice(begin, end))
return slices

Expand Down
4 changes: 2 additions & 2 deletions python/mxnet/module/executor_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ class DataParallelExecutorGroup(object):
shared_group : DataParallelExecutorGroup
Defaults to ``None``. This is used in bucketing. When not ``None``, it should be a executor
group corresponding to a different bucket. In other words, it will correspond to a different
symbol but with the same set of parameters (e.g. unrolled RNNs with different lengths).
In this case, many memory will be shared.
symbol with the same set of parameters (e.g. unrolled RNNs with different lengths).
In this case the memory regions of the parameters will be shared.
logger : Logger
Default is `logging`.
fixed_param_names: list of str
Expand Down

0 comments on commit 3384d20

Please sign in to comment.