Skip to content

Commit

Permalink
fixed bugs.
Browse files Browse the repository at this point in the history
  • Loading branch information
xiemoyuan committed Apr 20, 2021
1 parent 50023ca commit bdea472
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions paddlenlp/data/sampler.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ class SamplerHelper(object):
with a iterable dataset.
.. note::
The :meth:`__len__` method isn't strictly required by :class:`DataLoader`,
but is expected in any calculation involving the length of a
:class:`DataLoader`.
The :meth:`__len__` method isn't strictly required by
:class:`paddle.io.DataLoader`, but is expected in any calculation
involving the length of a :class:`paddle.io.DataLoader`.
Args:
dataset (Dataset): Input dataset for SamplerHelper.
dataset (Dataset): Input dataset for :class:`SamplerHelper`.
iterable (Iterable, optional): Iterator of dataset. Default: None.
"""

Expand Down Expand Up @@ -112,7 +112,7 @@ def shuffle(self, buffer_size=-1, seed=None):
Args:
buffer_size (int, optional): Buffer size for shuffle. if
:math:`buffer_size < 0` or more than the length of the dataset,
:math:`buffer\_size < 0` or more than the length of the dataset,
`buffer_size` is the length of the dataset. Default: -1.
seed (int, optional): Seed for the random. Default: None.
Expand Down Expand Up @@ -182,7 +182,7 @@ def sort(self, cmp=None, key=None, reverse=False, buffer_size=-1):
reverse (bool, optional): If True, it means in descending order,
and False means in ascending order. Default: False.
buffer_size (int, optional): Buffer size for sort. If
:math:`buffer_size < 0` or `buffer_size` is more than the length
:math:`buffer\_size < 0` or `buffer_size` is more than the length
of the data, `buffer_size` will be set to the length of the data.
Default: -1.
Expand Down

0 comments on commit bdea472

Please sign in to comment.