René's URL Explorer Experiment


Title: Samplers — PyTorch main documentation

Description: Data samplers in PyTorch C++ — RandomSampler, SequentialSampler, DistributedRandomSampler, and StreamSampler.

Keywords:

direct link

Domain: docs.pytorch.org


Hey, it has json ld scripts:
    {
       "@context": "https://schema.org",
       "@type": "Article",
       "name": "Samplers",
       "headline": "Samplers",
       "description": "Data samplers in PyTorch C++ \u2014 RandomSampler, SequentialSampler, DistributedRandomSampler, and StreamSampler.",
       "url": "/api/data/samplers.html",
       "articleBody": "Samplers# Samplers control the order in which samples are accessed from a dataset. They determine the indices that the DataLoader uses to fetch data. Sampler Base Class# template\u003ctypename BatchRequest = std::vector\u003csize_t\u003e\u003eclass Sampler# A Sampler is an object that yields an index with which to access a dataset. Subclassed by torch::data::samplers::RandomSampler, torch::data::samplers::SequentialSampler Public Types using BatchRequestType = BatchRequest# Public Functions virtual ~Sampler() = default# virtual void reset(std::optional\u003csize_t\u003e new_size) = 0# Resets the Sampler\u2019s internal state. Typically called before a new epoch. Optionally, accepts a new size when resetting the sampler. virtual std::optional\u003cBatchRequest\u003e next(size_t batch_size) = 0# Returns the next index if possible, or an empty optional if the sampler is exhausted for this epoch. virtual void save(serialize::OutputArchive \u0026archive) const = 0# Serializes the Sampler to the archive. virtual void load(serialize::InputArchive \u0026archive) = 0# Deserializes the Sampler from the archive. Sequential Sampler# Accesses samples in order from 0 to N-1. Use this for evaluation or when order matters. class SequentialSampler : public torch::data::samplers::Sampler\u003c\u003e# A Sampler that returns indices sequentially. Public Functions explicit SequentialSampler(size_t size)# Creates a SequentialSampler that will return indices in the range 0...size - 1. virtual void reset(std::optional\u003csize_t\u003e new_size = std::nullopt) override# Resets the SequentialSampler to zero. virtual std::optional\u003cstd::vector\u003csize_t\u003e\u003e next(size_t batch_size) override# Returns the next batch of indices. virtual void save(serialize::OutputArchive \u0026archive) const override# Serializes the SequentialSampler to the archive. virtual void load(serialize::InputArchive \u0026archive) override# Deserializes the SequentialSampler from the archive. size_t index() const noexcept# Returns the current index of the SequentialSampler. Random Sampler# Accesses samples in random order. Use this for training to ensure the model sees samples in different orders each epoch. class RandomSampler : public torch::data::samplers::Sampler\u003c\u003e# A Sampler that returns random indices. Public Functions explicit RandomSampler(int64_t size, Dtype index_dtype = torch::kInt64)# Constructs a RandomSampler with a size and dtype for the stored indices. The constructor will eagerly allocate all required indices, which is the sequence 0 ... size - 1. index_dtype is the data type of the stored indices. You can change it to influence memory usage. ~RandomSampler() override# virtual void reset(std::optional\u003csize_t\u003e new_size = std::nullopt) override# Resets the RandomSampler to a new set of indices. virtual std::optional\u003cstd::vector\u003csize_t\u003e\u003e next(size_t batch_size) override# Returns the next batch of indices. virtual void save(serialize::OutputArchive \u0026archive) const override# Serializes the RandomSampler to the archive. virtual void load(serialize::InputArchive \u0026archive) override# Deserializes the RandomSampler from the archive. size_t index() const noexcept# Returns the current index of the RandomSampler. Distributed Random Sampler# For distributed training, ensures each process gets a different subset of the data without overlap. class DistributedRandomSampler : public torch::data::samplers::DistributedSampler\u003c\u003e# Select samples randomly. The sampling order is shuffled at each reset() call. Public Functions DistributedRandomSampler(size_t size, size_t num_replicas = 1, size_t rank = 0, bool allow_duplicates = true)# virtual void reset(std::optional\u003csize_t\u003e new_size = std::nullopt) override# Resets the DistributedRandomSampler to a new set of indices. virtual std::optional\u003cstd::vector\u003csize_t\u003e\u003e next(size_t batch_size) override# Returns the next batch of indices. virtual void save(serialize::OutputArchive \u0026archive) const override# Serializes the DistributedRandomSampler to the archive. virtual void load(serialize::InputArchive \u0026archive) override# Deserializes the DistributedRandomSampler from the archive. size_t index() const noexcept# Returns the current index of the DistributedRandomSampler. Distributed Sampler (Base)# template\u003ctypename BatchRequest = std::vector\u003csize_t\u003e\u003eclass DistributedSampler : public torch::data::samplers::Sampler\u003cstd::vector\u003csize_t\u003e\u003e# A Sampler that selects a subset of indices to sample from and defines a sampling behavior. In a distributed setting, this selects a subset of the indices depending on the provided num_replicas and rank parameters. The Sampler performs a rounding operation based on the allow_duplicates parameter to decide the local sample count. Subclassed by torch::data::samplers::DistributedRandomSampler, torch::data::samplers::DistributedSequentialSampler Public Functions inline DistributedSampler(size_t size, size_t num_replicas = 1, size_t rank = 0, bool allow_duplicates = true)# inline void set_epoch(size_t epoch)# Set the epoch for the current enumeration. This can be used to alter the sample selection and shuffling behavior. inline size_t epoch() const# Distributed Sequential Sampler# class DistributedSequentialSampler : public torch::data::samplers::DistributedSampler\u003c\u003e# Select samples sequentially. Public Functions DistributedSequentialSampler(size_t size, size_t num_replicas = 1, size_t rank = 0, bool allow_duplicates = true)# virtual void reset(std::optional\u003csize_t\u003e new_size = std::nullopt) override# Resets the DistributedSequentialSampler to a new set of indices. virtual std::optional\u003cstd::vector\u003csize_t\u003e\u003e next(size_t batch_size) override# Returns the next batch of indices. virtual void save(serialize::OutputArchive \u0026archive) const override# Serializes the DistributedSequentialSampler to the archive. virtual void load(serialize::InputArchive \u0026archive) override# Deserializes the DistributedSequentialSampler from the archive. size_t index() const noexcept# Returns the current index of the DistributedSequentialSampler. Stream Sampler# class StreamSampler : public torch::data::samplers::Sampler\u003cBatchSize\u003e# A sampler for (potentially infinite) streams of data. The major feature of the StreamSampler is that it does not return particular indices, but instead only the number of elements to fetch from the dataset. The dataset has to decide how to produce those elements. Public Functions explicit StreamSampler(size_t epoch_size)# Constructs the StreamSampler with the number of individual examples that should be fetched until the sampler is exhausted. virtual void reset(std::optional\u003csize_t\u003e new_size = std::nullopt) override# Resets the internal state of the sampler. virtual std::optional\u003cBatchSize\u003e next(size_t batch_size) override# Returns a BatchSize object with the number of elements to fetch in the next batch. This number is the minimum of the supplied batch_size and the difference between the epoch_size and the current index. If the epoch_size has been reached, returns an empty optional. virtual void save(serialize::OutputArchive \u0026archive) const override# Serializes the StreamSampler to the archive. virtual void load(serialize::InputArchive \u0026archive) override# Deserializes the StreamSampler from the archive.",
       "author": {
         "@type": "Organization",
         "name": "PyTorch Contributors",
         "url": "https://pytorch.org"
       },
       "image": "https://pytorch.org/docs/stable/_static/img/pytorch_seo.png",
       "mainEntityOfPage": {
         "@type": "WebPage",
         "@id": "/api/data/samplers.html"
       },
       "datePublished": "2023-01-01T00:00:00Z",
       "dateModified": "2023-01-01T00:00:00Z"
     }
 

docsearch:languageen
llm:site-typedocumentation
llm:frameworkPyTorch
llm:descriptionData samplers in PyTorch C++ — RandomSampler, SequentialSampler, DistributedRandomSampler, and StreamSampler.
llm:navigation-filehttps://pytorch.org/docs/stable/llms.txt
llm:sitemaphttps://pytorch.org/docs/stable/sitemap.xml
llm:versionmain
llm:projectPyTorch
llm:page-typedocumentation
og:imagehttps://docs.pytorch.org/docs/stable/_static/img/pytorch_seo.png
None3

Links:

Skip to main contenthttps://docs.pytorch.org/cppdocs/api/data/samplers.html#main-content
Home https://docs.pytorch.org/cppdocs/index.html
mainhttps://docs.pytorch.org/cppdocs/index.html
Installing C++ Distributions of PyTorch https://docs.pytorch.org/cppdocs/installing.html
The C++ Frontend https://docs.pytorch.org/cppdocs/frontend.html
C++ API Reference https://docs.pytorch.org/cppdocs/api/index.html
ATen: Tensor Library https://docs.pytorch.org/cppdocs/api/aten/index.html
C10: Core Utilities https://docs.pytorch.org/cppdocs/api/c10/index.html
Autograd: Automatic Differentiation https://docs.pytorch.org/cppdocs/api/autograd/index.html
CUDA Support https://docs.pytorch.org/cppdocs/api/cuda/index.html
XPU Support https://docs.pytorch.org/cppdocs/api/xpu/index.html
Neural Network Modules (torch::nn) https://docs.pytorch.org/cppdocs/api/nn/index.html
Optimizers (torch::optim) https://docs.pytorch.org/cppdocs/api/optim/index.html
Data Loading (torch::data) https://docs.pytorch.org/cppdocs/api/data/index.html
Serialization (torch::serialize) https://docs.pytorch.org/cppdocs/api/serialize/index.html
Torch Library API https://docs.pytorch.org/cppdocs/api/library/index.html
Torch Stable API https://docs.pytorch.org/cppdocs/api/stable/index.html
FAQ https://docs.pytorch.org/cppdocs/faq.html
Go to pytorch.org https://pytorch.org
Xhttps://x.com/PyTorch
GitHubhttps://github.com/pytorch/pytorch
PyTorch Forumhttps://discuss.pytorch.org/
PyPihttps://pypi.org/project/torch/
mainhttps://docs.pytorch.org/cppdocs/index.html
Installing C++ Distributions of PyTorch https://docs.pytorch.org/cppdocs/installing.html
The C++ Frontend https://docs.pytorch.org/cppdocs/frontend.html
C++ API Reference https://docs.pytorch.org/cppdocs/api/index.html
ATen: Tensor Library https://docs.pytorch.org/cppdocs/api/aten/index.html
C10: Core Utilities https://docs.pytorch.org/cppdocs/api/c10/index.html
Autograd: Automatic Differentiation https://docs.pytorch.org/cppdocs/api/autograd/index.html
CUDA Support https://docs.pytorch.org/cppdocs/api/cuda/index.html
XPU Support https://docs.pytorch.org/cppdocs/api/xpu/index.html
Neural Network Modules (torch::nn) https://docs.pytorch.org/cppdocs/api/nn/index.html
Optimizers (torch::optim) https://docs.pytorch.org/cppdocs/api/optim/index.html
Data Loading (torch::data) https://docs.pytorch.org/cppdocs/api/data/index.html
Serialization (torch::serialize) https://docs.pytorch.org/cppdocs/api/serialize/index.html
Torch Library API https://docs.pytorch.org/cppdocs/api/library/index.html
Torch Stable API https://docs.pytorch.org/cppdocs/api/stable/index.html
FAQ https://docs.pytorch.org/cppdocs/faq.html
Go to pytorch.org https://pytorch.org
Xhttps://x.com/PyTorch
GitHubhttps://github.com/pytorch/pytorch
PyTorch Forumhttps://discuss.pytorch.org/
PyPihttps://pypi.org/project/torch/
ATen: Tensor Libraryhttps://docs.pytorch.org/cppdocs/api/aten/index.html
Tensor Classhttps://docs.pytorch.org/cppdocs/api/aten/tensor.html
Tensor Creationhttps://docs.pytorch.org/cppdocs/api/aten/creation.html
Tensor Indexinghttps://docs.pytorch.org/cppdocs/api/aten/indexing.html
Tensor Accessorshttps://docs.pytorch.org/cppdocs/api/aten/accessors.html
C10: Core Utilitieshttps://docs.pytorch.org/cppdocs/api/c10/index.html
Device and DeviceTypehttps://docs.pytorch.org/cppdocs/api/c10/device.html
Device Guardshttps://docs.pytorch.org/cppdocs/api/c10/guards.html
Streamshttps://docs.pytorch.org/cppdocs/api/c10/streams.html
Core Typeshttps://docs.pytorch.org/cppdocs/api/c10/types.html
Utilitieshttps://docs.pytorch.org/cppdocs/api/c10/utilities.html
Autograd: Automatic Differentiationhttps://docs.pytorch.org/cppdocs/api/autograd/index.html
Gradient Computationhttps://docs.pytorch.org/cppdocs/api/autograd/gradient.html
Custom Autograd Functionshttps://docs.pytorch.org/cppdocs/api/autograd/custom_functions.html
Gradient Modeshttps://docs.pytorch.org/cppdocs/api/autograd/modes.html
CUDA Supporthttps://docs.pytorch.org/cppdocs/api/cuda/index.html
CUDA Streamshttps://docs.pytorch.org/cppdocs/api/cuda/streams.html
CUDA Guardshttps://docs.pytorch.org/cppdocs/api/cuda/guards.html
CUDA Utility Functionshttps://docs.pytorch.org/cppdocs/api/cuda/utilities.html
XPU Supporthttps://docs.pytorch.org/cppdocs/api/xpu/index.html
XPU Streamshttps://docs.pytorch.org/cppdocs/api/xpu/streams.html
XPU Utility Functionshttps://docs.pytorch.org/cppdocs/api/xpu/utilities.html
Neural Network Modules (torch::nn)https://docs.pytorch.org/cppdocs/api/nn/index.html
Containershttps://docs.pytorch.org/cppdocs/api/nn/containers.html
Convolution Layershttps://docs.pytorch.org/cppdocs/api/nn/convolution.html
Pooling Layershttps://docs.pytorch.org/cppdocs/api/nn/pooling.html
Linear Layershttps://docs.pytorch.org/cppdocs/api/nn/linear.html
Activation Functionshttps://docs.pytorch.org/cppdocs/api/nn/activation.html
Normalization Layershttps://docs.pytorch.org/cppdocs/api/nn/normalization.html
Dropout Layershttps://docs.pytorch.org/cppdocs/api/nn/dropout.html
Embedding Layershttps://docs.pytorch.org/cppdocs/api/nn/embedding.html
Recurrent Layershttps://docs.pytorch.org/cppdocs/api/nn/recurrent.html
Transformer Layershttps://docs.pytorch.org/cppdocs/api/nn/transformer.html
Loss Functionshttps://docs.pytorch.org/cppdocs/api/nn/loss.html
Functional APIhttps://docs.pytorch.org/cppdocs/api/nn/functional.html
Utilitieshttps://docs.pytorch.org/cppdocs/api/nn/utilities.html
Optimizers (torch::optim)https://docs.pytorch.org/cppdocs/api/optim/index.html
Gradient Descent Optimizershttps://docs.pytorch.org/cppdocs/api/optim/gradient_descent.html
Adaptive Learning Rate Optimizershttps://docs.pytorch.org/cppdocs/api/optim/adaptive.html
Second-Order Optimizershttps://docs.pytorch.org/cppdocs/api/optim/second_order.html
Learning Rate Schedulershttps://docs.pytorch.org/cppdocs/api/optim/schedulers.html
Data Loading (torch::data)https://docs.pytorch.org/cppdocs/api/data/index.html
Datasetshttps://docs.pytorch.org/cppdocs/api/data/datasets.html
DataLoaderhttps://docs.pytorch.org/cppdocs/api/data/dataloader.html
Samplershttps://docs.pytorch.org/cppdocs/api/data/samplers.html
Transformshttps://docs.pytorch.org/cppdocs/api/data/transforms.html
Serialization (torch::serialize)https://docs.pytorch.org/cppdocs/api/serialize/index.html
Saving and Loadinghttps://docs.pytorch.org/cppdocs/api/serialize/save_load.html
Archiveshttps://docs.pytorch.org/cppdocs/api/serialize/archives.html
Checkpointshttps://docs.pytorch.org/cppdocs/api/serialize/checkpoints.html
Torch Library APIhttps://docs.pytorch.org/cppdocs/api/library/index.html
Operator Registrationhttps://docs.pytorch.org/cppdocs/api/library/registration.html
Custom Classeshttps://docs.pytorch.org/cppdocs/api/library/custom_classes.html
Library Versioninghttps://docs.pytorch.org/cppdocs/api/library/versioning.html
Torch Stable APIhttps://docs.pytorch.org/cppdocs/api/stable/index.html
Library Registration Macroshttps://docs.pytorch.org/cppdocs/api/stable/registration.html
Stable Operatorshttps://docs.pytorch.org/cppdocs/api/stable/operators.html
Utilitieshttps://docs.pytorch.org/cppdocs/api/stable/utilities.html
https://docs.pytorch.org/cppdocs/index.html
C++ API Referencehttps://docs.pytorch.org/cppdocs/api/index.html
Data Loading (torch::data)https://docs.pytorch.org/cppdocs/api/data/index.html
#https://docs.pytorch.org/cppdocs/api/data/samplers.html#samplers
#https://docs.pytorch.org/cppdocs/api/data/samplers.html#sampler-base-class
#https://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4I0EN5torch4data8samplers7SamplerE
Samplerhttps://docs.pytorch.org/cppdocs/api/data/samplers.html#PyTorchclasstorch_1_1data_1_1samplers_1_1_sampler
torch::data::samplers::RandomSamplerhttps://docs.pytorch.org/cppdocs/api/data/samplers.html#PyTorchclasstorch_1_1data_1_1samplers_1_1_random_sampler
torch::data::samplers::SequentialSamplerhttps://docs.pytorch.org/cppdocs/api/data/samplers.html#PyTorchclasstorch_1_1data_1_1samplers_1_1_sequential_sampler
BatchRequesthttps://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4I0EN5torch4data8samplers7SamplerE
#https://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4N5torch4data8samplers7Sampler16BatchRequestTypeE
#https://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4N5torch4data8samplers7SamplerD0Ev
#https://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4N5torch4data8samplers7Sampler5resetENSt8optionalI6size_tEE
Samplerhttps://docs.pytorch.org/cppdocs/api/data/samplers.html#PyTorchclasstorch_1_1data_1_1samplers_1_1_sampler
BatchRequesthttps://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4I0EN5torch4data8samplers7SamplerE
#https://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4N5torch4data8samplers7Sampler4nextE6size_t
OutputArchivehttps://docs.pytorch.org/cppdocs/api/serialize/archives.html#_CPPv4N5torch9serialize13OutputArchiveE
#https://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4NK5torch4data8samplers7Sampler4saveERN9serialize13OutputArchiveE
Samplerhttps://docs.pytorch.org/cppdocs/api/data/samplers.html#PyTorchclasstorch_1_1data_1_1samplers_1_1_sampler
InputArchivehttps://docs.pytorch.org/cppdocs/api/serialize/archives.html#_CPPv4N5torch9serialize12InputArchiveE
#https://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4N5torch4data8samplers7Sampler4loadERN9serialize12InputArchiveE
Samplerhttps://docs.pytorch.org/cppdocs/api/data/samplers.html#PyTorchclasstorch_1_1data_1_1samplers_1_1_sampler
#https://docs.pytorch.org/cppdocs/api/data/samplers.html#sequential-sampler
Samplerhttps://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4I0EN5torch4data8samplers7SamplerE
#https://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4N5torch4data8samplers17SequentialSamplerE
Samplerhttps://docs.pytorch.org/cppdocs/api/data/samplers.html#PyTorchclasstorch_1_1data_1_1samplers_1_1_sampler
#https://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4N5torch4data8samplers17SequentialSampler17SequentialSamplerE6size_t
SequentialSamplerhttps://docs.pytorch.org/cppdocs/api/data/samplers.html#PyTorchclasstorch_1_1data_1_1samplers_1_1_sequential_sampler
#https://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4N5torch4data8samplers17SequentialSampler5resetENSt8optionalI6size_tEE
SequentialSamplerhttps://docs.pytorch.org/cppdocs/api/data/samplers.html#PyTorchclasstorch_1_1data_1_1samplers_1_1_sequential_sampler
#https://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4N5torch4data8samplers17SequentialSampler4nextE6size_t
OutputArchivehttps://docs.pytorch.org/cppdocs/api/serialize/archives.html#_CPPv4N5torch9serialize13OutputArchiveE
#https://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4NK5torch4data8samplers17SequentialSampler4saveERN9serialize13OutputArchiveE
SequentialSamplerhttps://docs.pytorch.org/cppdocs/api/data/samplers.html#PyTorchclasstorch_1_1data_1_1samplers_1_1_sequential_sampler
InputArchivehttps://docs.pytorch.org/cppdocs/api/serialize/archives.html#_CPPv4N5torch9serialize12InputArchiveE
#https://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4N5torch4data8samplers17SequentialSampler4loadERN9serialize12InputArchiveE
SequentialSamplerhttps://docs.pytorch.org/cppdocs/api/data/samplers.html#PyTorchclasstorch_1_1data_1_1samplers_1_1_sequential_sampler
#https://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4NK5torch4data8samplers17SequentialSampler5indexEv
SequentialSamplerhttps://docs.pytorch.org/cppdocs/api/data/samplers.html#PyTorchclasstorch_1_1data_1_1samplers_1_1_sequential_sampler
#https://docs.pytorch.org/cppdocs/api/data/samplers.html#random-sampler
Samplerhttps://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4I0EN5torch4data8samplers7SamplerE
#https://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4N5torch4data8samplers13RandomSamplerE
Samplerhttps://docs.pytorch.org/cppdocs/api/data/samplers.html#PyTorchclasstorch_1_1data_1_1samplers_1_1_sampler
#https://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4N5torch4data8samplers13RandomSampler13RandomSamplerE7int64_t5Dtype
RandomSamplerhttps://docs.pytorch.org/cppdocs/api/data/samplers.html#PyTorchclasstorch_1_1data_1_1samplers_1_1_random_sampler
#https://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4N5torch4data8samplers13RandomSamplerD0Ev
#https://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4N5torch4data8samplers13RandomSampler5resetENSt8optionalI6size_tEE
RandomSamplerhttps://docs.pytorch.org/cppdocs/api/data/samplers.html#PyTorchclasstorch_1_1data_1_1samplers_1_1_random_sampler
#https://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4N5torch4data8samplers13RandomSampler4nextE6size_t
OutputArchivehttps://docs.pytorch.org/cppdocs/api/serialize/archives.html#_CPPv4N5torch9serialize13OutputArchiveE
#https://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4NK5torch4data8samplers13RandomSampler4saveERN9serialize13OutputArchiveE
RandomSamplerhttps://docs.pytorch.org/cppdocs/api/data/samplers.html#PyTorchclasstorch_1_1data_1_1samplers_1_1_random_sampler
InputArchivehttps://docs.pytorch.org/cppdocs/api/serialize/archives.html#_CPPv4N5torch9serialize12InputArchiveE
#https://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4N5torch4data8samplers13RandomSampler4loadERN9serialize12InputArchiveE
RandomSamplerhttps://docs.pytorch.org/cppdocs/api/data/samplers.html#PyTorchclasstorch_1_1data_1_1samplers_1_1_random_sampler
#https://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4NK5torch4data8samplers13RandomSampler5indexEv
RandomSamplerhttps://docs.pytorch.org/cppdocs/api/data/samplers.html#PyTorchclasstorch_1_1data_1_1samplers_1_1_random_sampler
#https://docs.pytorch.org/cppdocs/api/data/samplers.html#distributed-random-sampler
DistributedSamplerhttps://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4I0EN5torch4data8samplers18DistributedSamplerE
#https://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4N5torch4data8samplers24DistributedRandomSamplerE
reset()https://docs.pytorch.org/cppdocs/api/data/samplers.html#PyTorchclasstorch_1_1data_1_1samplers_1_1_distributed_random_sampler_1a027f5f662d2375c0edae7b6c9c8ea309
#https://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4N5torch4data8samplers24DistributedRandomSampler24DistributedRandomSamplerE6size_t6size_t6size_tb
#https://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4N5torch4data8samplers24DistributedRandomSampler5resetENSt8optionalI6size_tEE
DistributedRandomSamplerhttps://docs.pytorch.org/cppdocs/api/data/samplers.html#PyTorchclasstorch_1_1data_1_1samplers_1_1_distributed_random_sampler
#https://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4N5torch4data8samplers24DistributedRandomSampler4nextE6size_t
OutputArchivehttps://docs.pytorch.org/cppdocs/api/serialize/archives.html#_CPPv4N5torch9serialize13OutputArchiveE
#https://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4NK5torch4data8samplers24DistributedRandomSampler4saveERN9serialize13OutputArchiveE
DistributedRandomSamplerhttps://docs.pytorch.org/cppdocs/api/data/samplers.html#PyTorchclasstorch_1_1data_1_1samplers_1_1_distributed_random_sampler
InputArchivehttps://docs.pytorch.org/cppdocs/api/serialize/archives.html#_CPPv4N5torch9serialize12InputArchiveE
#https://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4N5torch4data8samplers24DistributedRandomSampler4loadERN9serialize12InputArchiveE
DistributedRandomSamplerhttps://docs.pytorch.org/cppdocs/api/data/samplers.html#PyTorchclasstorch_1_1data_1_1samplers_1_1_distributed_random_sampler
#https://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4NK5torch4data8samplers24DistributedRandomSampler5indexEv
DistributedRandomSamplerhttps://docs.pytorch.org/cppdocs/api/data/samplers.html#PyTorchclasstorch_1_1data_1_1samplers_1_1_distributed_random_sampler
#https://docs.pytorch.org/cppdocs/api/data/samplers.html#distributed-sampler-base
Samplerhttps://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4I0EN5torch4data8samplers7SamplerE
#https://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4I0EN5torch4data8samplers18DistributedSamplerE
Samplerhttps://docs.pytorch.org/cppdocs/api/data/samplers.html#PyTorchclasstorch_1_1data_1_1samplers_1_1_sampler
Samplerhttps://docs.pytorch.org/cppdocs/api/data/samplers.html#PyTorchclasstorch_1_1data_1_1samplers_1_1_sampler
torch::data::samplers::DistributedRandomSamplerhttps://docs.pytorch.org/cppdocs/api/data/samplers.html#PyTorchclasstorch_1_1data_1_1samplers_1_1_distributed_random_sampler
torch::data::samplers::DistributedSequentialSamplerhttps://docs.pytorch.org/cppdocs/api/data/samplers.html#PyTorchclasstorch_1_1data_1_1samplers_1_1_distributed_sequential_sampler
#https://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4N5torch4data8samplers18DistributedSampler18DistributedSamplerE6size_t6size_t6size_tb
#https://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4N5torch4data8samplers18DistributedSampler9set_epochE6size_t
#https://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4NK5torch4data8samplers18DistributedSampler5epochEv
#https://docs.pytorch.org/cppdocs/api/data/samplers.html#distributed-sequential-sampler
DistributedSamplerhttps://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4I0EN5torch4data8samplers18DistributedSamplerE
#https://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4N5torch4data8samplers28DistributedSequentialSamplerE
#https://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4N5torch4data8samplers28DistributedSequentialSampler28DistributedSequentialSamplerE6size_t6size_t6size_tb
#https://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4N5torch4data8samplers28DistributedSequentialSampler5resetENSt8optionalI6size_tEE
DistributedSequentialSamplerhttps://docs.pytorch.org/cppdocs/api/data/samplers.html#PyTorchclasstorch_1_1data_1_1samplers_1_1_distributed_sequential_sampler
#https://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4N5torch4data8samplers28DistributedSequentialSampler4nextE6size_t
OutputArchivehttps://docs.pytorch.org/cppdocs/api/serialize/archives.html#_CPPv4N5torch9serialize13OutputArchiveE
#https://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4NK5torch4data8samplers28DistributedSequentialSampler4saveERN9serialize13OutputArchiveE
DistributedSequentialSamplerhttps://docs.pytorch.org/cppdocs/api/data/samplers.html#PyTorchclasstorch_1_1data_1_1samplers_1_1_distributed_sequential_sampler
InputArchivehttps://docs.pytorch.org/cppdocs/api/serialize/archives.html#_CPPv4N5torch9serialize12InputArchiveE
#https://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4N5torch4data8samplers28DistributedSequentialSampler4loadERN9serialize12InputArchiveE
DistributedSequentialSamplerhttps://docs.pytorch.org/cppdocs/api/data/samplers.html#PyTorchclasstorch_1_1data_1_1samplers_1_1_distributed_sequential_sampler
#https://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4NK5torch4data8samplers28DistributedSequentialSampler5indexEv
DistributedSequentialSamplerhttps://docs.pytorch.org/cppdocs/api/data/samplers.html#PyTorchclasstorch_1_1data_1_1samplers_1_1_distributed_sequential_sampler
#https://docs.pytorch.org/cppdocs/api/data/samplers.html#stream-sampler
Samplerhttps://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4I0EN5torch4data8samplers7SamplerE
#https://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4N5torch4data8samplers13StreamSamplerE
StreamSamplerhttps://docs.pytorch.org/cppdocs/api/data/samplers.html#PyTorchclasstorch_1_1data_1_1samplers_1_1_stream_sampler
#https://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4N5torch4data8samplers13StreamSampler13StreamSamplerE6size_t
StreamSamplerhttps://docs.pytorch.org/cppdocs/api/data/samplers.html#PyTorchclasstorch_1_1data_1_1samplers_1_1_stream_sampler
#https://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4N5torch4data8samplers13StreamSampler5resetENSt8optionalI6size_tEE
#https://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4N5torch4data8samplers13StreamSampler4nextE6size_t
OutputArchivehttps://docs.pytorch.org/cppdocs/api/serialize/archives.html#_CPPv4N5torch9serialize13OutputArchiveE
#https://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4NK5torch4data8samplers13StreamSampler4saveERN9serialize13OutputArchiveE
StreamSamplerhttps://docs.pytorch.org/cppdocs/api/data/samplers.html#PyTorchclasstorch_1_1data_1_1samplers_1_1_stream_sampler
InputArchivehttps://docs.pytorch.org/cppdocs/api/serialize/archives.html#_CPPv4N5torch9serialize12InputArchiveE
#https://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4N5torch4data8samplers13StreamSampler4loadERN9serialize12InputArchiveE
StreamSamplerhttps://docs.pytorch.org/cppdocs/api/data/samplers.html#PyTorchclasstorch_1_1data_1_1samplers_1_1_stream_sampler
previous DataLoader https://docs.pytorch.org/cppdocs/api/data/dataloader.html
next Transforms https://docs.pytorch.org/cppdocs/api/data/transforms.html
PyData Sphinx Themehttps://pydata-sphinx-theme.readthedocs.io/en/stable/index.html
previous DataLoader https://docs.pytorch.org/cppdocs/api/data/dataloader.html
next Transforms https://docs.pytorch.org/cppdocs/api/data/transforms.html
Sampler Base Classhttps://docs.pytorch.org/cppdocs/api/data/samplers.html#sampler-base-class
torch::data::samplers::Samplerhttps://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4I0EN5torch4data8samplers7SamplerE
BatchRequestTypehttps://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4N5torch4data8samplers7Sampler16BatchRequestTypeE
~Sampler()https://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4N5torch4data8samplers7SamplerD0Ev
reset()https://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4N5torch4data8samplers7Sampler5resetENSt8optionalI6size_tEE
next()https://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4N5torch4data8samplers7Sampler4nextE6size_t
save()https://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4NK5torch4data8samplers7Sampler4saveERN9serialize13OutputArchiveE
load()https://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4N5torch4data8samplers7Sampler4loadERN9serialize12InputArchiveE
Sequential Samplerhttps://docs.pytorch.org/cppdocs/api/data/samplers.html#sequential-sampler
torch::data::samplers::SequentialSamplerhttps://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4N5torch4data8samplers17SequentialSamplerE
SequentialSampler()https://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4N5torch4data8samplers17SequentialSampler17SequentialSamplerE6size_t
reset()https://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4N5torch4data8samplers17SequentialSampler5resetENSt8optionalI6size_tEE
next()https://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4N5torch4data8samplers17SequentialSampler4nextE6size_t
save()https://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4NK5torch4data8samplers17SequentialSampler4saveERN9serialize13OutputArchiveE
load()https://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4N5torch4data8samplers17SequentialSampler4loadERN9serialize12InputArchiveE
index()https://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4NK5torch4data8samplers17SequentialSampler5indexEv
Random Samplerhttps://docs.pytorch.org/cppdocs/api/data/samplers.html#random-sampler
torch::data::samplers::RandomSamplerhttps://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4N5torch4data8samplers13RandomSamplerE
RandomSampler()https://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4N5torch4data8samplers13RandomSampler13RandomSamplerE7int64_t5Dtype
~RandomSampler()https://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4N5torch4data8samplers13RandomSamplerD0Ev
reset()https://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4N5torch4data8samplers13RandomSampler5resetENSt8optionalI6size_tEE
next()https://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4N5torch4data8samplers13RandomSampler4nextE6size_t
save()https://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4NK5torch4data8samplers13RandomSampler4saveERN9serialize13OutputArchiveE
load()https://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4N5torch4data8samplers13RandomSampler4loadERN9serialize12InputArchiveE
index()https://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4NK5torch4data8samplers13RandomSampler5indexEv
Distributed Random Samplerhttps://docs.pytorch.org/cppdocs/api/data/samplers.html#distributed-random-sampler
torch::data::samplers::DistributedRandomSamplerhttps://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4N5torch4data8samplers24DistributedRandomSamplerE
DistributedRandomSampler()https://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4N5torch4data8samplers24DistributedRandomSampler24DistributedRandomSamplerE6size_t6size_t6size_tb
reset()https://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4N5torch4data8samplers24DistributedRandomSampler5resetENSt8optionalI6size_tEE
next()https://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4N5torch4data8samplers24DistributedRandomSampler4nextE6size_t
save()https://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4NK5torch4data8samplers24DistributedRandomSampler4saveERN9serialize13OutputArchiveE
load()https://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4N5torch4data8samplers24DistributedRandomSampler4loadERN9serialize12InputArchiveE
index()https://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4NK5torch4data8samplers24DistributedRandomSampler5indexEv
Distributed Sampler (Base)https://docs.pytorch.org/cppdocs/api/data/samplers.html#distributed-sampler-base
torch::data::samplers::DistributedSamplerhttps://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4I0EN5torch4data8samplers18DistributedSamplerE
DistributedSampler()https://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4N5torch4data8samplers18DistributedSampler18DistributedSamplerE6size_t6size_t6size_tb
set_epoch()https://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4N5torch4data8samplers18DistributedSampler9set_epochE6size_t
epoch()https://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4NK5torch4data8samplers18DistributedSampler5epochEv
Distributed Sequential Samplerhttps://docs.pytorch.org/cppdocs/api/data/samplers.html#distributed-sequential-sampler
torch::data::samplers::DistributedSequentialSamplerhttps://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4N5torch4data8samplers28DistributedSequentialSamplerE
DistributedSequentialSampler()https://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4N5torch4data8samplers28DistributedSequentialSampler28DistributedSequentialSamplerE6size_t6size_t6size_tb
reset()https://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4N5torch4data8samplers28DistributedSequentialSampler5resetENSt8optionalI6size_tEE
next()https://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4N5torch4data8samplers28DistributedSequentialSampler4nextE6size_t
save()https://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4NK5torch4data8samplers28DistributedSequentialSampler4saveERN9serialize13OutputArchiveE
load()https://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4N5torch4data8samplers28DistributedSequentialSampler4loadERN9serialize12InputArchiveE
index()https://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4NK5torch4data8samplers28DistributedSequentialSampler5indexEv
Stream Samplerhttps://docs.pytorch.org/cppdocs/api/data/samplers.html#stream-sampler
torch::data::samplers::StreamSamplerhttps://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4N5torch4data8samplers13StreamSamplerE
StreamSampler()https://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4N5torch4data8samplers13StreamSampler13StreamSamplerE6size_t
reset()https://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4N5torch4data8samplers13StreamSampler5resetENSt8optionalI6size_tEE
next()https://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4N5torch4data8samplers13StreamSampler4nextE6size_t
save()https://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4NK5torch4data8samplers13StreamSampler4saveERN9serialize13OutputArchiveE
load()https://docs.pytorch.org/cppdocs/api/data/samplers.html#_CPPv4N5torch4data8samplers13StreamSampler4loadERN9serialize12InputArchiveE
Show Source https://docs.pytorch.org/cppdocs/_sources/api/data/samplers.md.txt
ExecuTorchhttps://docs.pytorch.org/executorch
Helionhttps://docs.pytorch.org/helion
torchaohttps://docs.pytorch.org/ao
kinetohttps://github.com/pytorch/kineto
torchtitanhttps://github.com/pytorch/torchtitan
TorchRLhttps://docs.pytorch.org/rl
torchvisionhttps://docs.pytorch.org/vision
torchaudiohttps://docs.pytorch.org/audio
tensordicthttps://docs.pytorch.org/tensordict
PyTorch on XLA Deviceshttps://docs.pytorch.org/xla
View Docshttps://docs.pytorch.org/docs/stable/index.html
View Tutorialshttps://docs.pytorch.org/tutorials
View Resourceshttps://pytorch.org/resources
Privacy Policyhttps://www.linuxfoundation.org/privacy/
https://www.facebook.com/pytorch
https://twitter.com/pytorch
https://www.youtube.com/pytorch
https://www.linkedin.com/company/pytorch
https://pytorch.slack.com
https://pytorch.org/wechat
Policieshttps://www.linuxfoundation.org/legal/policies
Trademark Usagehttps://www.linuxfoundation.org/trademark-usage
Privacy Policyhttp://www.linuxfoundation.org/privacy
Cookies Policyhttps://opensource.fb.com/legal/cookie-policy
Sphinxhttps://www.sphinx-doc.org/
PyData Sphinx Themehttps://pydata-sphinx-theme.readthedocs.io/en/stable/index.html

Viewport: width=device-width, initial-scale=1


URLs of crawlers that visited me.