3 #include <torch/data/samplers/base.h> 4 #include <torch/serialize/archive.h> 10 template <
typename BatchRequest>
11 serialize::OutputArchive& operator<<(
12 serialize::OutputArchive& archive,
13 const Sampler<BatchRequest>& sampler) {
14 sampler.save(archive);
19 template <
typename BatchRequest>
20 serialize::InputArchive& operator>>(
21 serialize::InputArchive& archive,
22 Sampler<BatchRequest>& sampler) {
23 sampler.load(archive);