3 #include <torch/types.h> 11 template <
typename Data = Tensor,
typename Target = Tensor>
13 using DataType = Data;
14 using TargetType = Target;
17 Example(Data data, Target target)
18 : data(std::move(data)), target(std::move(target)) {}
25 using NoTarget = void;
32 template <
typename Data>
34 using DataType = Data;
35 using TargetType = example::NoTarget;
38 Example(Data data) : data(std::move(data)) {}
46 operator const Data&()
const {
An Example from a dataset.