org.bytedeco.pytorch.ChunkMapDataset Maven / Gradle / Ivy
// Targeted by JavaCPP version 1.5.9: 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 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 static org.bytedeco.pytorch.global.torch.*;
// namespace detail
/** A {@code MapDataset} is a dataset that applies a transform to a source dataset. */
@Name("torch::data::datasets::MapDataset >,torch::data::transforms::Stack > >") @NoOffset @Properties(inherit = org.bytedeco.pytorch.presets.torch.class)
public class ChunkMapDataset extends ChunkMapBatchDataset {
static { Loader.load(); }
/** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */
public ChunkMapDataset(Pointer p) { super(p); }
public ChunkMapDataset(@ByVal ChunkSharedBatchDataset dataset, @ByVal @Cast("torch::data::datasets::MapDataset >,torch::data::transforms::Stack > >::TransformType*") ExampleStack transform) { super((Pointer)null); allocate(dataset, transform); }
private native void allocate(@ByVal ChunkSharedBatchDataset dataset, @ByVal @Cast("torch::data::datasets::MapDataset >,torch::data::transforms::Stack > >::TransformType*") ExampleStack transform);
/** Gets a batch from the source dataset and applies the transform to it,
* returning the result. */
public native @Name("get_batch") @ByVal ExampleOptional get_batch_example(@Cast("size_t") long indices);
/** Returns the size of the source dataset. */
// NOLINTNEXTLINE(bugprone-exception-escape)
public native @ByVal @NoException(true) SizeTOptional size();
/** Calls {@code reset()} on the underlying dataset.
* NOTE: Stateless datasets do not have a reset() method, so a call to this
* method will only compile for stateful datasets (which have a reset()
* method). */
/** Returns the underlying dataset. */
public native @Const @ByRef @NoException(true) ChunkSharedBatchDataset dataset();
/** Returns the transform being applied. */
public native @Const @ByRef @NoException(true) ExampleStack transform();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy