You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

mindspore.dataset.RandomSampler.rst 770 B

4 years ago
123456789101112131415161718192021
  1. mindspore.dataset.RandomSampler
  2. ================================
  3. .. py:class:: mindspore.dataset.RandomSampler(replacement=False, num_samples=None)
  4. 随机采样器。
  5. **参数:**
  6. - **replacement** (bool, 可选): 是否将样本ID放回下一次采样,默认值:False,无放回采样。
  7. - **num_samples** (int, 可选): 获取的样本数,可用于部分获取采样得到的样本。默认值:None,获取采样到的所有样本。
  8. **异常:**
  9. - **TypeError** `replacement` 不是bool值。
  10. - **TypeError** `num_samples` 不是整数值。
  11. - **ValueError** `num_samples` 为负值。
  12. .. include:: mindspore.dataset.BuiltinSampler.rst
  13. .. include:: mindspore.dataset.BuiltinSampler.b.rst