Shortcuts

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

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources