![JAR search and dependency download from the Maven repository](/logo.png)
org.bytedeco.pytorch.JavaStreamTensorDataLoaderBase Maven / Gradle / Ivy
The newest version!
// Targeted by JavaCPP version 1.5.11: DO NOT EDIT THIS FILE
package org.bytedeco.pytorch;
import org.bytedeco.pytorch.Allocator;
import org.bytedeco.pytorch.Function;
import org.bytedeco.pytorch.Module;
import org.bytedeco.javacpp.annotation.Cast;
import java.nio.*;
import org.bytedeco.javacpp.*;
import org.bytedeco.javacpp.annotation.*;
import static org.bytedeco.javacpp.presets.javacpp.*;
import static org.bytedeco.openblas.global.openblas_nolapack.*;
import static org.bytedeco.openblas.global.openblas.*;
import org.bytedeco.javacpp.chrono.*;
import static org.bytedeco.javacpp.global.chrono.*;
import static org.bytedeco.pytorch.global.torch.*;
@Name("torch::data::DataLoaderBase") @NoOffset @Properties(inherit = org.bytedeco.pytorch.presets.torch.class)
public class JavaStreamTensorDataLoaderBase extends Pointer {
static { Loader.load(); }
/** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */
public JavaStreamTensorDataLoaderBase(Pointer p) { super(p); }
/** Constructs a new DataLoader from a {@code dataset} to sample from, {@code options}
* to configure the DataLoader with, and a {@code sampler} that specifies the
* sampling strategy. */
// NOLINTNEXTLINE(bugprone-exception-escape)
/** Returns an iterator into the DataLoader. The lifetime of the iterator is
* bound to the DataLoader. In C++ standards language, the category of the
* iterator is {@code OutputIterator}. See
* https://en.cppreference.com/w/cpp/named_req/OutputIterator for what this
* means. In short: you may increment the iterator and dereference it, but
* cannot go back, or step forward more than one position at a time. When the
* DataLoader is exhausted, it will compare equal with the special
* "sentinel" iterator returned by {@code DataLoader::end()}. Most of the time, you
* should only use range-for loops to loop over the DataLoader, but
* standard algorithms like {@code std::copy(dataloader.begin(), dataloader.end(),
* output_iterator)} are supported too. */
public native @ByVal TensorExampleVectorIterator begin();
/** Returns a special "sentinel" iterator that compares equal with a
* non-sentinel iterator once the DataLoader is exhausted. */
public native @ByVal TensorExampleVectorIterator end();
/** Joins the DataLoader's worker threads and drains internal queues.
* This function may only be invoked from the main thread (in which the
* DataLoader lives). */
public native void join();
/** Returns the options with which the DataLoader was configured. */
public native @Const @ByRef @NoException(true) FullDataLoaderOptions options();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy