Template Struct Example

Page Contents

Struct Documentation

template<typename Data = Tensor, typename Target = Tensor>
struct torch::data::Example

An Example from a dataset.

A dataset consists of data and an associated target (label).

Public Types

using DataType = Data
using TargetType = Target

Public Functions

Example() = default
Example(Data data, Target target)

Public Members

Data data
Target target


Access comprehensive developer documentation for PyTorch

View Docs


Get in-depth tutorials for beginners and advanced developers

View Tutorials


Find development resources and get your questions answered

View Resources