Template Struct Example< Data, example::NoTarget >

Page Contents

Struct Documentation

template<typename Data>
struct torch::data::Example<Data, example::NoTarget>

A specialization for Example that does not have have a target.

This class exists so that code can be written for a templated Example type, and work both for labeled and unlabeled datasets.

Public Types

using DataType = Data
using TargetType = example::NoTarget

Public Functions

Example() = default
Example(Data data)
operator Data&()
operator const Data&() const

Public Members

Data data


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