You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2018/01/22 22:04:13 UTC

[GitHub] zhreshold commented on a change in pull request #9514: Language Modeling Datasets and Sampler

zhreshold commented on a change in pull request #9514: Language Modeling Datasets and Sampler
URL: https://github.com/apache/incubator-mxnet/pull/9514#discussion_r163080467
 
 

 ##########
 File path: python/mxnet/gluon/data/sampler.py
 ##########
 @@ -136,3 +136,30 @@ def __len__(self):
         raise ValueError(
             "last_batch must be one of 'keep', 'discard', or 'rollover', " \
             "but got %s"%self._last_batch)
+
+
+class IntervalSampler(Sampler):
+    """Samples elements from [0, length) at fixed intervals.
+
+    Parameters
+    ----------
+    length : int
+        Length of the sequence.
 
 Review comment:
   interval : int
       Sampling interval

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services